forked from mirror/openmw-tes3mp
fixed fog in some cells
This commit is contained in:
parent
fab927b4ce
commit
a6c3e06e54
1 changed files with 2 additions and 2 deletions
|
@ -227,7 +227,7 @@
|
||||||
float4 worldNormal = shMatrixMult(worldMatrix, float4(normal.xyz, 0));
|
float4 worldNormal = shMatrixMult(worldMatrix, float4(normal.xyz, 0));
|
||||||
waterEyePos = intercept(worldPos, cameraPos.xyz - worldPos, float3(0,1,0), waterLevel);
|
waterEyePos = intercept(worldPos, cameraPos.xyz - worldPos, float3(0,1,0), waterLevel);
|
||||||
caustics = getCaustics(causticMap, worldPos, waterEyePos.xyz, worldNormal.xyz, lightDirectionWS0.xyz, waterLevel, waterTimer, windDir_windSpeed);
|
caustics = getCaustics(causticMap, worldPos, waterEyePos.xyz, worldNormal.xyz, lightDirectionWS0.xyz, waterLevel, waterTimer, windDir_windSpeed);
|
||||||
if (worldPos.y >= waterLevel || waterEnabled != 1)
|
if (worldPos.y >= waterLevel || waterEnabled != 1.f)
|
||||||
caustics = float3(1,1,1);
|
caustics = float3(1,1,1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@
|
||||||
|
|
||||||
#if UNDERWATER
|
#if UNDERWATER
|
||||||
// regular fog only if fragment is above water
|
// regular fog only if fragment is above water
|
||||||
if (worldPos.y > waterLevel)
|
if (worldPos.y > waterLevel || waterEnabled != 1.f)
|
||||||
#endif
|
#endif
|
||||||
shOutputColour(0).xyz = shLerp (shOutputColour(0).xyz, gammaCorrectRead(fogColour), fogValue);
|
shOutputColour(0).xyz = shLerp (shOutputColour(0).xyz, gammaCorrectRead(fogColour), fogValue);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue