1
0
Fork 0

adapt water_lightfield shader to the previous changes

Signed-off-by: Emilian Huminiuc <emilianh@gmail.com>
This commit is contained in:
Emilian Huminiuc 2012-06-16 21:24:27 +03:00
parent b67a848bfc
commit 42e4428f8d

View file

@ -41,6 +41,7 @@ uniform float WaveSharp ;
uniform float WaveAngle ;
uniform float WaveFactor ;
uniform float WaveDAngle ;
uniform float normalmap_dds;
uniform float hazeLayerAltitude;
@ -316,11 +317,9 @@ void main(void)
// mix water and noise, modulated by factor
vNorm = normalize(mix(nmap, nmap1, mixFactor) * waveRoughness);
if (detail_flag == 1) {vNorm.r += ddx + ddx1 + ddx2 + ddx3;}
vNorm = -vNorm;
//dds fix
if (normalmap_dds > 0)
vNorm = -vNorm; //dds fix
//load reflection
@ -367,7 +366,8 @@ void main(void)
N = normalize(mix(Normal + N0, Normal + N1, mixFactor) * waveRoughness);
N = -N; //dds fix
if (normalmap_dds > 0)
N = -N; //dds fix
}
else
{N = vec3 (0.0, 0.0, 1.0);}