Normal Map Shader
The Cg shader in this article covers all the basics for high-quality rendering of normal mapped meshes: specular lighting (+ specular intensity map), colored light + ambient, attenuation.
Managing Cg Shaders
Hardware rendering has moved from fixed function towards being completely shader-based. Here I describe how I manage shaders in Kingdoms Creator, including generating shaders from templates.
An overview of how to use projected textures with shaders, including calculating the projected coordinate, stopping reverse projection, and a bit about shadow mapping.
Fog and Attenuation
You get two sections in this article. The first gives one way to add full scene fog, like that available in a fixed pipeline, into a shader. The second gives a couple possible light attenuation functions to use in a shader.
No, there isn't a complete shader in this article. If you follow the link to the documentation though, there's a cool screenshot, and a pretty thourough overview how my displacement shader works.
The beginning of my journey to finally add a water shader to my engine is chronicled here. The water shader uses planar reflections to reflect geometry above the surface, then distorts it in the shader using normal maps.
Skeletal Animation | Lighting & Shadows | Collision Detection | Topic Overview | Sample Programs | Building Blocks | Math | About this Blog | Off Topic