SDK White Paper. Vertex Lighting Achieving fast lighting results

Similar documents
SDK White Paper. Matrix Palette Skinning An Example

Technical Report. Anisotropic Lighting using HLSL

SDK White Paper. Occlusion Query Checking for Hidden Pixels

SDK White Paper. HLSL Blood Shader Gravity Maps

User Guide. Vertex Texture Fetch Water

Application Note. NVIDIA Business Platform System Builder Certification Guide. September 2005 DA _v01

White Paper. Soft Shadows. February 2007 WP _v01

Enthusiast System Architecture Certification Feature Requirements

Technical Report. Mesh Instancing

Technical Brief. LinkBoost Technology Faster Clocks Out-of-the-Box. May 2006 TB _v01

GPU LIBRARY ADVISOR. DA _v8.0 September Application Note

Android PerfHUD ES quick start guide

User Guide. GLExpert NVIDIA Performance Toolkit

GRID SOFTWARE FOR RED HAT ENTERPRISE LINUX WITH KVM VERSION /370.28

White Paper. Denoising. February 2007 WP _v01

GLExpert NVIDIA Performance Toolkit

White Paper. Texture Arrays Terrain Rendering. February 2007 WP _v01

NVIDIA nforce 790i SLI Chipsets

Sparkling Effect. February 2007 WP _v01

Technical Brief. NVIDIA Quadro FX Rotated Grid Full-Scene Antialiasing (RG FSAA)

NVWMI VERSION 2.18 STANDALONE PACKAGE

NVWMI VERSION 2.24 STANDALONE PACKAGE

White Paper. Solid Wireframe. February 2007 WP _v01

User Guide. GPGPU Disease

SDK White Paper. Soft Shadows

Technical Brief. NVIDIA and Microsoft Windows Vista Getting the Most Out Of Microsoft Windows Vista

Multi-View Soft Shadows. Louis Bavoil

Cg Toolkit. Cg 1.4 rc 1 Release Notes

GRID SOFTWARE FOR MICROSOFT WINDOWS SERVER VERSION /370.12

NSIGHT ECLIPSE PLUGINS INSTALLATION GUIDE

Cg Toolkit. Cg 2.0 January 2008 Release Notes

Technical Report. GLSL Pseudo-Instancing

Order Independent Transparency with Dual Depth Peeling. Louis Bavoil, Kevin Myers

Cg Toolkit. Cg 1.2 Release Notes

Cg Toolkit. Cg 2.1 beta August 2008 Release Notes

NVIDIA SDK. NVMeshMender Code Sample User Guide

User Guide. TexturePerformancePBO Demo

Constant-Memory Order-Independent Transparency Techniques

NVIDIA CAPTURE SDK 6.1 (WINDOWS)

Cg Toolkit. Cg 1.3 Release Notes. December 2004

Cg Toolkit. Cg 2.0 May 2008 Release Notes

SDK White Paper. Video Filtering on the GPU. Eric Young NVIDIA Corporation 2701 San Tomas Expressway Santa Clara, CA 95050

Cg Toolkit. Cg 2.1 October 2008 Release Notes

Technical Report. SLI Best Practices

Tuning CUDA Applications for Fermi. Version 1.2

Horizon-Based Ambient Occlusion using Compute Shaders. Louis Bavoil

Technical Brief. AGP 8X Evolving the Graphics Interface

QUADRO SYNC II FIRMWARE VERSION 2.02

Deinterleaved Texturing for Cache-Efficient Interleaved Sampling. Louis Bavoil

Soft Particles. Tristan Lorach

Cg Toolkit. Cg 2.2 April 2009 Release Notes

High Quality DXT Compression using OpenCL for CUDA. Ignacio Castaño

NVIDIA CAPTURE SDK 6.0 (WINDOWS)

NVIDIA DEBUG MANAGER FOR ANDROID NDK - VERSION 8.0.1

Technical Brief. FirstPacket Technology Improved System Performance. May 2006 TB _v01

White Paper. Perlin Fire. February 2007 WP _v01

Technical Report. SLI Best Practices

NVIDIA CAPTURE SDK 7.1 (WINDOWS)

User Guide. DU _v01f January 2004

Skinned Instancing. Bryan Dudash

Histogram calculation in CUDA. Victor Podlozhnyuk

CUDA/OpenGL Fluid Simulation. Nolan Goodnight

Cg Toolkit. Cg 2.2 February 2010 Release Notes

GRID VIRTUAL GPU FOR HUAWEI UVP Version ,

MOSAIC CONTROL DISPLAYS

Optical Flow Estimation with CUDA. Mikhail Smirnov

NVIDIA CUDA C GETTING STARTED GUIDE FOR MAC OS X

Technical Brief. NVIDIA Storage Technology Confidently Store Your Digital Assets

PASCAL COMPATIBILITY GUIDE FOR CUDA APPLICATIONS

CUDA TOOLKIT 3.2 READINESS FOR CUDA APPLICATIONS

CUDA Particles. Simon Green

MAXWELL COMPATIBILITY GUIDE FOR CUDA APPLICATIONS

VIRTUAL GPU MANAGEMENT PACK FOR VMWARE VREALIZE OPERATIONS

Getting Started. NVIDIA CUDA C Installation and Verification on Mac OS X

Histogram calculation in OpenCL. Victor Podlozhnyuk

Getting Started. NVIDIA CUDA Development Tools 2.3 Installation and Verification on Mac OS X

NVIDIA CUDA GETTING STARTED GUIDE FOR MAC OS X

RMA PROCESS. vr384 October RMA Process

Getting Started. NVIDIA CUDA Development Tools 2.2 Installation and Verification on Mac OS X. May 2009 DU _v01

KEPLER COMPATIBILITY GUIDE FOR CUDA APPLICATIONS

GRID VIRTUAL GPU FOR HUAWEI UVP Version /

GRID VGPU FOR VMWARE VSPHERE Version /

Tegra 250 Development Kit Android Setup Experience

User Guide. NVIDIA Quadro FX 4700 X2 BY PNY Technologies Part No. VCQFX4700X2-PCIE-PB

CUDA-GDB: The NVIDIA CUDA Debugger

VIRTUAL GPU LICENSE SERVER VERSION

Technical Report. Non-Power-of-Two Mipmap Creation

GRID SOFTWARE MANAGEMENT SDK

Specification. Tesla S870 GPU Computing System. March 13, 2008 SP _v00b

TUNING CUDA APPLICATIONS FOR MAXWELL

Semantic and Annotation Remapping in FX Composer

VIRTUAL GPU SOFTWARE MANAGEMENT SDK

Cg Toolkit. Cg 1.2 User s Manual Addendum

TESLA 1U GPU COMPUTING SYSTEMS

TUNING CUDA APPLICATIONS FOR MAXWELL

NVIDIA Quadro K6000 SDI Reference Guide

NVIDIA Tesla Compute Cluster Driver for Windows

PNY Technologies, Inc. 299 Webro Rd. Parsippany, NJ Tel: Fax:

GRID SOFTWARE FOR HUAWEI UVP VERSION /370.12

NSIGHT ECLIPSE EDITION

Transcription:

SDK White Paper Vertex Lighting Achieving fast lighting results WP-01400-001-v01 July 2004

Abstract Vertex Lighting Vertex lighting is not as accurate as per-pixel lighting. However, it has the advantage of being very fast. The lighting calculations are done only per vertex. This document describes briefly several implementations of vertex lighting, namely: Point lights with specular characteristics Directional lights with specular characteristics Two-sided lighting 17 simple-point diffuse-only light implementation. These sample implementations do not use any pixel shader, in the interest of focusing on the vertex shader. However, the vertex shader can be combined with more complex pixel shader operations to achieve great results. All techniques are implemented under DirectX9.0b and run on VS1.1. Bryan Dudash bdudash@nvidia.com NVIDIA Corporation 2701 San Tomas Expressway Santa Clara, CA 95050 WP-01400-001_v01 1

Various Lights Diffuse Specular Point (3 lights) To use diffuse specular point lighting, calculate the dynamic vertex color using the standard Blinn diffuse and specular equations one time per light: Diffuse = DiffuseColor *( N L) Specular = SpecularColor *( H N) Attenuation = A 0 + A d + A d 1 2 2 spec The resulting color from each light is added into a final result per vertex. The diffuse color and specular color inputs, as well as the light direction, are supplied as constants for each light source. Note: For point lights, the specular and diffuse components are attenuated based on distance(d). WP-01400-001_v01 2

Depth of Field Diffuse Specular Directional (3 lights) Diffuse specular directional lighting equations are done once per light and the resultant color from each light is added into a final result per vertex. The lighting calculations for these are the same as the diffuse specular point lights described in the previous section, except there is no attenuation involved and the light direction is passed down to the shader instead of the light position. WP-01400-001_v01 3

Depth of Field Two-sided Diffuse (1 light) Two-sided diffuse lighting applies lighting to both sides of a model. A face normal is passed down as an extra piece of information to the vertex shader in the vertex stream. As a result this technique cannot be used with indexed vertex buffers. WP-01400-001_v01 4

Depth of Field Many Point (17 lights) A many-point lighting technique implements a simple diffuse lighting equation based on vertex position and light position for 17 lights. This technique demonstrates how to implement an extremely cheap light in hardware and to obtain many light sources. It compiles to PS1.1. WP-01400-001_v01 5

Notice ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, MATERIALS ) ARE BEING PROVIDED AS IS." NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Information furnished is believed to be accurate and reliable. However, NVIDIA Corporation assumes no responsibility for the consequences of use of such information or for any infringement of patents or other rights of third parties that may result from its use. No license is granted by implication or otherwise under any patent or patent rights of NVIDIA Corporation. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. NVIDIA Corporation products are not authorized for use as critical components in life support devices or systems without express written approval of NVIDIA Corporation. Trademarks NVIDIA and the NVIDIA logo are trademarks or registered trademarks of NVIDIA Corporation in the United States and other countries. Other company and product names may be trademarks of the respective companies with which they are associated. Copyright 2004 NVIDIA Corporation. All rights reserved NVIDIA Corporation 2701 San Tomas Expressway Santa Clara, CA 95050 www.nvidia.com