About Store Forum Documentation Contact

Post Reply 
Fog in shaders
Author Message
fatcoder Offline

Post: #1
Fog in shaders
I'm trying to apply fog to objects drawn with a custom shader. However I'm having trouble get the same effect as the engine shaders. As the camera moves away from my objects (using the custom shaders), they look different to the objects using the engine shaders because of the fog calculations.

I've been experimenting with the fog "color", "density" and "end" in my custom shaders but cannot reproduce the same effect. Esenthel can you please shed some light on how the fog is calculated in the pixel shader so I can reproduce the same effect in custom shaders? Thanks.
05-05-2013 12:36 PM
Find all posts by this user Quote this message in a reply
Post Reply