diff options
author | wwylele <wwylele@gmail.com> | 2017-08-21 11:03:38 +0200 |
---|---|---|
committer | wwylele <wwylele@gmail.com> | 2017-08-22 08:34:44 +0200 |
commit | 17c6104d2afda7bf354c454f87561a3dbdf524e3 (patch) | |
tree | eb511786edb2242912ddb054ff8e0be0e7cc4ea1 /src/video_core/renderer_opengl/gl_shader_gen.cpp | |
parent | SwRasterizer/Lighting: implement LUT input CP (diff) | |
download | yuzu-17c6104d2afda7bf354c454f87561a3dbdf524e3.tar yuzu-17c6104d2afda7bf354c454f87561a3dbdf524e3.tar.gz yuzu-17c6104d2afda7bf354c454f87561a3dbdf524e3.tar.bz2 yuzu-17c6104d2afda7bf354c454f87561a3dbdf524e3.tar.lz yuzu-17c6104d2afda7bf354c454f87561a3dbdf524e3.tar.xz yuzu-17c6104d2afda7bf354c454f87561a3dbdf524e3.tar.zst yuzu-17c6104d2afda7bf354c454f87561a3dbdf524e3.zip |
Diffstat (limited to '')
-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 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) { // 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)"; |