Twin Cities Code Camp

Matt Christian

Lighten Up! Lighting a 3D World with HLSL

by Matt Christian

Wed, Oct 01, 2008
Room:
Time: 0:00

Presentation Materials - Slides and Code

The basics of Microsoft's high-level shading language (HLSL) are introduced, including a basic overview of the rendering pipeline, through the creation of a point light shader. HLSL allows graphics programmers to create realistic graphics through the use of a combination of math algorithms and the hardware they are processed on. Around the time of DirectX 8, shaders were implemented to allow changes per geometric shape, vertex, and pixel during a frame render. As one of the items comes to render on the graphics device, the math algorithm written into the shader file is applied to the respective object and is rendered to the screen. Current technology has reached the point where shaders are a necessity for any graphics developer, considering graphics libraries such as Microsoft's XNA have removed support for a non-programmed, ‘fixed' graphics pipeline. A simple shader is built to emulate a point light while each step includes reasoning behind the code and relevance to the theory of a point light. A conclusion is given explaining other uses for shaders.


About the Author

Matt Christian