summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video_core/renderer_opengl/gl_shader_gen.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp
index 600119321..669ba398d 100644
--- a/src/video_core/renderer_opengl/gl_shader_gen.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp
@@ -536,8 +536,8 @@ static void WriteLighting(std::string& out, const PicaShaderConfig& config) {
536 } 536 }
537 537
538 // Rotate the surface-local normal by the interpolated normal quaternion to convert it to 538 // Rotate the surface-local normal by the interpolated normal quaternion to convert it to
539 // eyespace 539 // eyespace.
540 out += "vec3 normal = normalize(quaternion_rotate(normquat, surface_normal));\n"; 540 out += "vec3 normal = quaternion_rotate(normalize(normquat), surface_normal);\n";
541 541
542 // Gets the index into the specified lookup table for specular lighting 542 // Gets the index into the specified lookup table for specular lighting
543 auto GetLutIndex = [&lighting](unsigned light_num, LightingRegs::LightingLutInput input, 543 auto GetLutIndex = [&lighting](unsigned light_num, LightingRegs::LightingLutInput input,
@@ -1003,7 +1003,9 @@ uniform sampler1D proctex_diff_lut;
1003// Rotate the vector v by the quaternion q 1003// Rotate the vector v by the quaternion q
1004vec3 quaternion_rotate(vec4 q, vec3 v) { 1004vec3 quaternion_rotate(vec4 q, vec3 v) {
1005 return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v); 1005 return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
1006})"; 1006}
1007
1008)";
1007 1009
1008 if (config.state.proctex.enable) 1010 if (config.state.proctex.enable)
1009 AppendProcTexSampler(out, config); 1011 AppendProcTexSampler(out, config);