Archived

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

DanG

Mixing Texturing and Lighting

Recommended Posts

DanG    122
I have a qestion. How do you control how the texturing and the lighting of an object are blended in OpenGL? I want to be able to control the blending of the two but i don''t know how. Any hints? He who said money was the root of all evil knew little of the nature of money and less about the nature of man.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Better asked in the OpenGL forum...

OpenGL applies diffuse lighting, then specular lighting, then the texture.

If you want any blending/ordering other than that, you''d have to to render in two passes.

Share this post


Link to post
Share on other sites
outRider    852
You can apply specular after the texture with an extension. You can control how a texture blends with whatever is under it with a glBlendFunc... other that I''m not sure what you need.

------------
- outRider -

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Thnks for the input. Specular after the texturing sounds like what i want. However i have never used an OpenGL extension before, is it simple? I''m currently using GL_MODULATE to do default blending in the game. I''ll look into extensions on this subject, thanx

Share this post


Link to post
Share on other sites