Advertisement

Shading a texture.

Started by July 19, 2000 07:59 PM
1 comment, last by Keith P Parsons 24 years, 4 months ago
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---
Advertisement
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 Grovespauls opengl page

This topic is closed to new replies.

Advertisement