adapt water_lightfield shader to the previous changes
Signed-off-by: Emilian Huminiuc <emilianh@gmail.com>
This commit is contained in:
parent
b67a848bfc
commit
42e4428f8d
1 changed files with 36 additions and 36 deletions
|
@ -41,6 +41,7 @@ uniform float WaveSharp ;
|
||||||
uniform float WaveAngle ;
|
uniform float WaveAngle ;
|
||||||
uniform float WaveFactor ;
|
uniform float WaveFactor ;
|
||||||
uniform float WaveDAngle ;
|
uniform float WaveDAngle ;
|
||||||
|
uniform float normalmap_dds;
|
||||||
|
|
||||||
|
|
||||||
uniform float hazeLayerAltitude;
|
uniform float hazeLayerAltitude;
|
||||||
|
@ -316,11 +317,9 @@ void main(void)
|
||||||
// mix water and noise, modulated by factor
|
// mix water and noise, modulated by factor
|
||||||
vNorm = normalize(mix(nmap, nmap1, mixFactor) * waveRoughness);
|
vNorm = normalize(mix(nmap, nmap1, mixFactor) * waveRoughness);
|
||||||
if (detail_flag == 1) {vNorm.r += ddx + ddx1 + ddx2 + ddx3;}
|
if (detail_flag == 1) {vNorm.r += ddx + ddx1 + ddx2 + ddx3;}
|
||||||
vNorm = -vNorm;
|
|
||||||
//dds fix
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (normalmap_dds > 0)
|
||||||
|
vNorm = -vNorm; //dds fix
|
||||||
|
|
||||||
//load reflection
|
//load reflection
|
||||||
|
|
||||||
|
@ -367,7 +366,8 @@ void main(void)
|
||||||
|
|
||||||
N = normalize(mix(Normal + N0, Normal + N1, mixFactor) * waveRoughness);
|
N = normalize(mix(Normal + N0, Normal + N1, mixFactor) * waveRoughness);
|
||||||
|
|
||||||
N = -N; //dds fix
|
if (normalmap_dds > 0)
|
||||||
|
N = -N; //dds fix
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{N = vec3 (0.0, 0.0, 1.0);}
|
{N = vec3 (0.0, 0.0, 1.0);}
|
||||||
|
|
Loading…
Add table
Reference in a new issue