summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-05-26 11:55:42 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-05-27 09:13:41 +0200
commit669ef82aee76ddd1c9f356542f187038fe47eeb9 (patch)
tree1df789d8cc2fe210e57c9bc4e9fc3dccd1da2df3
parentMerge pull request #2697 from wwylele/proctex (diff)
downloadyuzu-669ef82aee76ddd1c9f356542f187038fe47eeb9.tar
yuzu-669ef82aee76ddd1c9f356542f187038fe47eeb9.tar.gz
yuzu-669ef82aee76ddd1c9f356542f187038fe47eeb9.tar.bz2
yuzu-669ef82aee76ddd1c9f356542f187038fe47eeb9.tar.lz
yuzu-669ef82aee76ddd1c9f356542f187038fe47eeb9.tar.xz
yuzu-669ef82aee76ddd1c9f356542f187038fe47eeb9.tar.zst
yuzu-669ef82aee76ddd1c9f356542f187038fe47eeb9.zip
-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) {
}
// Rotate the surface-local normal by the interpolated normal quaternion to convert it to
- // eyespace
- out += "vec3 normal = normalize(quaternion_rotate(normquat, surface_normal));\n";
+ // eyespace.
+ out += "vec3 normal = quaternion_rotate(normalize(normquat), surface_normal);\n";
// Gets the index into the specified lookup table for specular lighting
auto GetLutIndex = [&lighting](unsigned light_num, LightingRegs::LightingLutInput input,
@@ -1003,7 +1003,9 @@ uniform sampler1D proctex_diff_lut;
// Rotate the vector v by the quaternion q
vec3 quaternion_rotate(vec4 q, vec3 v) {
return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
-})";
+}
+
+)";
if (config.state.proctex.enable)
AppendProcTexSampler(out, config);