RE: [Algorithms] object-space bump mapping
Brought to you by:
vexxed72
From: Jon W. <hp...@mi...> - 2002-03-26 23:53:51
|
> I can't help feeling that there should be a better lighting approach > given current hardware, that doesn't use the old hardware lighting ideas > as building blocks. Maybe one day, I'll figure it one out! I use the texture coordinate generation from normal maps and reflection maps, and use the texture matrix to collapse to a 1D or 2D texture look-up (in the cases where a cube map would be overkill). Works for all diffuse (NORMAL_MAP) and specular (REFLECTION_MAP) lighting equations I've tried so far. You can even use non-uniform scale to hack some non-uniform surface scattering properties. In a vertex shader, this coordinate generation + matrix will simplify quite nicely, too! Cheers, / h+ |