Textured Lighting

Started by
0 comments, last by Digitalfragment 20 years, 5 months ago
I have been playing around for a while now using 3D textures for per-pixel-lighting (per-texel?) I have noticed that when using glTexImage(1/2/3)D OpenGL specifies a format GL_INTENSITY, how does this differ from GL_LUMNIACE? Both seemed to give the exact same result - i dont see why they would give the same thing two names... :/ Ive got a nice effect out of combining a 3D Texture to simulate an omni-directional light & a Normalmap for DOT3 shading. Is there a way of also introducing a specular highlight without the use of Shaders / Combiners? I''m kinda using outdated technology here... Thanks for any help in advance!
Advertisement
quote:Original post by Exorcist
I have noticed that when using glTexImage(1/2/3)D OpenGL specifies a format GL_INTENSITY, how does this differ from GL_LUMNIACE? Both seemed to give the exact same result - i dont see why they would give the same thing two names... :/
I seem to vaguely remember that they differ in what alpha value gets passed to the pipeline, I think one passes either 1.0 or 0.0, while the other passes the same value as for the other channels (R,G,B). You probably don''t use alpha, and therefore don''t notice the difference.
Oh and I''m not actually sure about it, I just seem to remember reading it somewhere.

quote:Ive got a nice effect out of combining a 3D Texture to simulate an omni-directional light & a Normalmap for DOT3 shading. Is there a way of also introducing a specular highlight without the use of Shaders / Combiners? I''m kinda using outdated technology here...
Hmm, you could use environment maps to simulate the exponent, and then blend this with your 3D texture. Alternatively, look up the normal vector at the location, transform it, and use that as the parameter for looking up in the environment map. The attenuation will now have to be done per-vertex, as most pre-shader cards only support 2 textures, the only exception I know about is the Radeon 7xxx (which was formerly known as "Radeon", without a number). If you have one of those, you can use your 3D texture for attenuation as well.

- JQ
~phil

This topic is closed to new replies.

Advertisement