Shaders + fog

Started by
13 comments, last by BradDaBug 18 years, 5 months ago
I remember having that with the fixed pipeline.
Set the fog color to the same color your background is.
“Always programm as if the person who will be maintaining your program is a violent psychopath that knows where you live”
Advertisement
Turns out the frustum was set further back than the fog, so pixels were being drawn further than gl_Fog.end, so fog was negative. Setting the fog end equal to the far plane fixed it.
I like the DARK layout!
you could use a max(0.0, fog) to avoid that if.
By the way, is it necessary to bind the alpha map, or is there a way to use it without burning a texture unit (or does that even matter with shaders)?
I like the DARK layout!
Anyone?
I like the DARK layout!

This topic is closed to new replies.

Advertisement