View Full Version : Lighting after textures
10-30-2002, 08:27 AM
I have a small scene that I have added textures to some of the polygons. The scene renders correctly when textruing is disabled, but when texturing is enabled, all objects are at least half as bright.
10-30-2002, 11:02 AM
Okay, figured this one out on my own. First problem, I didn't load the texture correctly. Second problem, if you don't color the object white, then it has the appearance of being dimly lit (with the wrong shading).
10-30-2002, 11:16 AM
The reason it appeared dim when you didn't set the color to white is due to 2 reasons.
1. The default setting for glTexEnv is GL_MODULATE, which causes the texture to combine with the current color (or material properties when lighting is enabled)
2. The default color is a light gray. (Don't remember the exact values offhand.)
You can either do as you did and set the color to white, or you could also use glTexEnvi and set the mode to GL_DECAL or GL_REPLACE.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.