Vertex Shaded, Textures + Lighting
Argh!
I''m trying to combine vertex based shading with a blended texture and lighting and it''s not working..but.. I can sucessfully combine any 2 out of these 3 (ie vertex shading +texture belnding works fine, vertex shading+lighting works fine, lighting+texture works fine).
What happens is that when I enable lighting the texture seems to dominate the surface color - the vertex shades seem to be ignored. If I disable lighting then the surface is nicely shaded and blended with the texture.
I''m fairly sure the lighting normals and the light is set up correctly as the surfaces are correctly shadowed - they just don''t show any coloration from the vertex shades (ie all surfaces are a uniform gray - the same color as the texture).
I am using the GL_MODULATE texture environment mode and a single light with diffuse and ambient components. The texture is RGBA , the surfaces are simple GL_TRIANGLES and I''m using the GL_SMOOTH shade model.
Is there anything obvious I have missed here?
Cheers
Keef
-----------------------
glDisable(WORK);
glEnable(GL_CODING);
-----------------------Current Project: The Chromatic Game Engine
January 02, 2002 08:43 AM
Try changing material properties... ...?
glEnable(GL_COLOR_MATERIAL);
glMaterialfv(GL_FRONT, GL_DIFFUSE, something);
glEnable(GL_COLOR_MATERIAL);
glMaterialfv(GL_FRONT, GL_DIFFUSE, something);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement