Skip to content
Snippets Groups Projects
Commit f156730f authored by Ptolemy's avatar Ptolemy
Browse files

SL-13465 Fix local scalar mix masking global mix() function.

parent 31924129
No related branches found
No related tags found
No related merge requests found
......@@ -64,9 +64,9 @@ void main()
vec3 luma_weights = vec3(0.3, 0.5, 0.3);
vec4 light_color = max(sunlight_color, moonlight_color);
float mix = 1.0 - dot(normalize(light_color.rgb), luma_weights);
float blend = 1.0 - dot(normalize(light_color.rgb), luma_weights);
vec3 exp = vec3(1.0 - mix * moon_brightness) * 2.0 - 1.0;
vec3 exp = vec3(1.0 - blend * moon_brightness) * 2.0 - 1.0;
c.rgb = pow(c.rgb, exp);
//c.rgb *= moonlight_color.rgb;
......
......@@ -56,9 +56,9 @@ void main()
// mix factor which blends when sunlight is brighter
// and shows true moon color at night
vec3 luma_weights = vec3(0.3, 0.5, 0.3);
float mix = 1.0f - dot(normalize(sunlight_color.rgb), luma_weights);
float blend = 1.0f - dot(normalize(sunlight_color.rgb), luma_weights);
vec3 exp = vec3(1.0 - mix * moon_brightness) * 2.0 - 1.0;
vec3 exp = vec3(1.0 - blend * moon_brightness) * 2.0 - 1.0;
c.rgb = pow(c.rgb, exp);
//c.rgb *= moonlight_color.rgb;
......
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