summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_gen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp
index ae67aab05..d85f281e5 100644
--- a/src/video_core/renderer_opengl/gl_shader_gen.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp
@@ -594,8 +594,8 @@ static void WriteLighting(std::string& out, const PicaShaderConfig& config) {
594 // Note: even if the normal vector is modified by normal map, which is not the 594 // Note: even if the normal vector is modified by normal map, which is not the
595 // normal of the tangent plane anymore, the half angle vector is still projected 595 // normal of the tangent plane anymore, the half angle vector is still projected
596 // using the modified normal vector. 596 // using the modified normal vector.
597 std::string half_angle_proj = "normalize(half_vector) - normal / dot(normal, " 597 std::string half_angle_proj =
598 "normal) * dot(normal, normalize(half_vector))"; 598 "normalize(half_vector) - normal * dot(normal, normalize(half_vector))";
599 // Note: the half angle vector projection is confirmed not normalized before the dot 599 // Note: the half angle vector projection is confirmed not normalized before the dot
600 // product. The result is in fact not cos(phi) as the name suggested. 600 // product. The result is in fact not cos(phi) as the name suggested.
601 index = "dot(" + half_angle_proj + ", tangent)"; 601 index = "dot(" + half_angle_proj + ", tangent)";