View Full Version : how to use glFogCoordEXT in GLSL

06-20-2013, 02:49 AM
I used glFogCoordEXT to distinguish explored and unexplored terrain. But after i use a shader for normal mapping on terrain, its working fine but the fog is no more there.

can some one please help me, (i don't know glsl).

06-20-2013, 06:10 AM
When you have a fragment shader active, it replaces the fixed function shading pipeline. This includes fog.

Instead, send the fog attribute as a vertex shader input and apply the fog effect in your shader.