diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 552de0aee..9e9d307ae 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -688,7 +688,7 @@ static void WriteLighting(std::string& out, const PicaShaderConfig& config) { // If enabled, clamp specular component if lighting result is zero if (lighting.clamp_highlights) { - out += "clamp_highlights = dot_product == 0.0 ? 0.0 : 1.0;\n"; + out += "clamp_highlights = sign(dot_product);\n"; } // If enabled, compute spot light attenuation value