Shading a texture.
I''m having trouble shading the textures that
I''m using on various polygons.
With out a texture just using the diffuse Material
color it looks shaded. But when I apply a texture
I get the texture but no shading.
Does anyone know how to shading to a texture?
Does anyone know were I can find some code that does this?
You need to modulate the shading on top of the texture. Meaning that if you have lit vertices then you need to set the vertex color as the first color componet and the texture as the second texture and modulate them together.
---Ranok---
Yup, in other words make sure your texture environment is set to GL_MODULATE and not GL_REPLACE
Paul Groves
pauls opengl page
paul's opengl message board
Paul Groves
pauls opengl page
paul's opengl message board
Paul Grovespauls opengl page
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement