Sfoglia il codice sorgente

gl_shader_gen: View should be normalized.

bunnei 10 anni fa
parent
commit
01b407638c
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/video_core/renderer_opengl/gl_shader_gen.cpp

+ 2 - 2
src/video_core/renderer_opengl/gl_shader_gen.cpp

@@ -341,11 +341,11 @@ static void WriteLighting(std::string& out, const PicaShaderConfig& config) {
             break;
 
         case Regs::LightingLutInput::VH:
-            index = std::string("dot(view, " + half_angle + ")");
+            index = std::string("dot(normalize(view), " + half_angle + ")");
             break;
 
         case Regs::LightingLutInput::NV:
-            index = std::string("dot(normal, view)");
+            index = std::string("dot(normal, normalize(view))");
             break;
 
         case Regs::LightingLutInput::LN: