Skip to content

Commit

Permalink
Remove light brightness doubling in shader
Browse files Browse the repository at this point in the history
For some reason there was a hard-coded scale factor of 2.0 applied to all
lights in the shader (this is over and on top of the 2x scaling via the
lightScale setting in the .game file, so 4x brightness in total), resulting in
lights appearing far too bright and in many areas completely washed out.

The brightness now appears much closer to that seen in game (possibly slightly
darker because the game is providing some brightness and gamma scaling of its
own, which is not replicated in DarkRadiant).
  • Loading branch information
Matthew Mott committed Mar 8, 2021
1 parent 0b00b9f commit 8cd54cd
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion install/gl/interaction_fp.glsl
Expand Up @@ -79,7 +79,6 @@ void main()

// compute final color
gl_FragColor = diffuse * (uInvertVCol ? vec4(1.0, 1.0, 1.0, 1.0) - gl_Color : gl_Color);
gl_FragColor.rgb *= 2.0; // replacement for RENDER_SCREEN light scaling
gl_FragColor.rgb += specular;
gl_FragColor.rgb *= attenuation_xy;
gl_FragColor.rgb *= attenuation_z;
Expand Down

0 comments on commit 8cd54cd

Please sign in to comment.