fog now distance based instead of depth

This commit is contained in:
scrawl 2012-10-03 12:03:07 +02:00
parent 21493c2dbd
commit 7ee038fdd7
3 changed files with 2 additions and 3 deletions

View file

@ -256,7 +256,7 @@
#endif
#if FOG
float fogValue = shSaturate((depthPassthrough - fogParams.y) * fogParams.w);
float fogValue = shSaturate((length(cameraPos.xyz-worldPos) - fogParams.y) * fogParams.w);
#if UNDERWATER
// regular fog only if fragment is above water

View file

@ -1,6 +1,5 @@
configuration water_reflection
{
fog false
shadows false
shadows_pssm false
mrt_output false

View file

@ -332,7 +332,7 @@
#if FOG
float fogValue = shSaturate((depth - fogParams.y) * fogParams.w);
float fogValue = shSaturate((length(cameraPos.xyz-worldPos) - fogParams.y) * fogParams.w);
#if UNDERWATER
// regular fog only if fragment is above water