PDA

View Full Version : how to use glFogCoordEXT in GLSL



rakeshmalik91
06-20-2013, 03: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).

malexander
06-20-2013, 07: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.