Update opengl_fragment.glsl

This is hardly worthy of a commit but it bugged me
This commit is contained in:
Gefüllte Taubenbrust 2024-04-01 15:21:10 +02:00
parent e7f1e86173
commit 877607240a
1 changed files with 1 additions and 1 deletions

View File

@ -525,7 +525,7 @@ void main(void)
reflect_ray = -normalize(v_LightDirection - fNormal * dot(v_LightDirection, fNormal) * 2.0);
float fresnel_factor = dot(fNormal, viewVec);
float brightness_factor = 1. - adjusted_night_ratio;
float brightness_factor = 1.0 - adjusted_night_ratio;
// A little trig hack. We go from the dot product of viewVec and normal to the dot product of viewVec and tangent to apply a fresnel effect.
fresnel_factor = clamp(pow(1.0 - fresnel_factor * fresnel_factor, 8.0), 0.0, 1.0);