diff options
author | bunnei <bunneidev@gmail.com> | 2017-08-31 03:07:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-31 03:07:30 +0200 |
commit | f0e461bf6f9d38c35c581e75731ac80fca3f3172 (patch) | |
tree | 0a54a98595c313afd9002ed9964c94255a88abc4 /src/video_core/renderer_opengl | |
parent | Merge pull request #2899 from wwylele/touch-refactor (diff) | |
parent | gl_rasterizer/lighting: more accurate CP formula (diff) | |
download | yuzu-f0e461bf6f9d38c35c581e75731ac80fca3f3172.tar yuzu-f0e461bf6f9d38c35c581e75731ac80fca3f3172.tar.gz yuzu-f0e461bf6f9d38c35c581e75731ac80fca3f3172.tar.bz2 yuzu-f0e461bf6f9d38c35c581e75731ac80fca3f3172.tar.lz yuzu-f0e461bf6f9d38c35c581e75731ac80fca3f3172.tar.xz yuzu-f0e461bf6f9d38c35c581e75731ac80fca3f3172.tar.zst yuzu-f0e461bf6f9d38c35c581e75731ac80fca3f3172.zip |
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_gen.cpp | 4 |
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 015e69da9..3f390491a 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) { // Note: even if the normal vector is modified by normal map, which is not the // normal of the tangent plane anymore, the half angle vector is still projected // using the modified normal vector. - std::string half_angle_proj = "normalize(half_vector) - normal / dot(normal, " - "normal) * dot(normal, normalize(half_vector))"; + std::string half_angle_proj = + "normalize(half_vector) - normal * dot(normal, normalize(half_vector))"; // Note: the half angle vector projection is confirmed not normalized before the dot // product. The result is in fact not cos(phi) as the name suggested. index = "dot(" + half_angle_proj + ", tangent)"; |