Archived

This topic is now archived and is closed to further replies.

Textured Lighting

This topic is 5149 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites