diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-01-28 05:16:36 +0100 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-02-04 22:08:47 +0100 |
commit | 000e78144ce87d0be1749f26b9d0494d3c4ddf2f (patch) | |
tree | ab7180a99b8289dff4b2ee96f7675816e5cc0d2b /src/video_core/renderer_opengl/gl_shader_gen.cpp | |
parent | Merge pull request #2476 from yuriks/shader-refactor3 (diff) | |
download | yuzu-000e78144ce87d0be1749f26b9d0494d3c4ddf2f.tar yuzu-000e78144ce87d0be1749f26b9d0494d3c4ddf2f.tar.gz yuzu-000e78144ce87d0be1749f26b9d0494d3c4ddf2f.tar.bz2 yuzu-000e78144ce87d0be1749f26b9d0494d3c4ddf2f.tar.lz yuzu-000e78144ce87d0be1749f26b9d0494d3c4ddf2f.tar.xz yuzu-000e78144ce87d0be1749f26b9d0494d3c4ddf2f.tar.zst yuzu-000e78144ce87d0be1749f26b9d0494d3c4ddf2f.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_gen.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_gen.cpp | 7 |
1 files changed, 4 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 4c4f98ac9..c34c3463f 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -13,6 +13,7 @@ #include "video_core/renderer_opengl/gl_shader_util.h" using Pica::Regs; +using Pica::RasterizerRegs; using TevStageConfig = Regs::TevStageConfig; namespace GLShader { @@ -639,10 +640,10 @@ vec4 secondary_fragment_color = vec4(0.0); } // Append the scissor test - if (state.scissor_test_mode != Regs::ScissorMode::Disabled) { + if (state.scissor_test_mode != RasterizerRegs::ScissorMode::Disabled) { out += "if ("; // Negate the condition if we have to keep only the pixels outside the scissor box - if (state.scissor_test_mode == Regs::ScissorMode::Include) + if (state.scissor_test_mode == RasterizerRegs::ScissorMode::Include) out += "!"; out += "(gl_FragCoord.x >= scissor_x1 && " "gl_FragCoord.y >= scissor_y1 && " @@ -652,7 +653,7 @@ vec4 secondary_fragment_color = vec4(0.0); out += "float z_over_w = 1.0 - gl_FragCoord.z * 2.0;\n"; out += "float depth = z_over_w * depth_scale + depth_offset;\n"; - if (state.depthmap_enable == Pica::Regs::DepthBuffering::WBuffering) { + if (state.depthmap_enable == Pica::RasterizerRegs::DepthBuffering::WBuffering) { out += "depth /= gl_FragCoord.w;\n"; } |