Skip to content
Snippets Groups Projects
Commit 968d10f4 authored by NiranV's avatar NiranV
Browse files

Fixed: (For-ported) Water specularity changing sometimes at certain camera angles.

parent ad553ff2
No related branches found
No related tags found
No related merge requests found
......@@ -81,13 +81,8 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou
haze_weight = vec4(haze_density) / temp1;
//(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
temp2.y = max(0.0, tmpLightnorm.y);
if (abs(temp2.y) > 0.000001f)
{
temp2.y = 1. / abs(temp2.y);
}
temp2.y = max(0.0000001f, temp2.y);
sunlight *= exp(-light_atten * temp2.y);
// SL-12978: temp2.y = 1; optimized away
sunlight *= exp(-light_atten);
// main atmospheric scattering line integral
temp2.z = Plen * dens_mul;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment