diff options
author | bunnei <bunneidev@gmail.com> | 2016-01-21 04:27:33 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2016-01-21 04:27:33 +0100 |
commit | 0b6cc0592dec5584d1a2211e9d777f0b2640faea (patch) | |
tree | 055bc437e6d0dbf37d7d6440ba4992be6c051e4e /src/video_core/renderer_opengl/gl_shader_gen.cpp | |
parent | Merge pull request #1363 from robturn/master (diff) | |
parent | hwrasterizer: Use depth offset (diff) | |
download | yuzu-0b6cc0592dec5584d1a2211e9d777f0b2640faea.tar yuzu-0b6cc0592dec5584d1a2211e9d777f0b2640faea.tar.gz yuzu-0b6cc0592dec5584d1a2211e9d777f0b2640faea.tar.bz2 yuzu-0b6cc0592dec5584d1a2211e9d777f0b2640faea.tar.lz yuzu-0b6cc0592dec5584d1a2211e9d777f0b2640faea.tar.xz yuzu-0b6cc0592dec5584d1a2211e9d777f0b2640faea.tar.zst yuzu-0b6cc0592dec5584d1a2211e9d777f0b2640faea.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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp index 38de5d469..22022f7f4 100644 --- a/src/video_core/renderer_opengl/gl_shader_gen.cpp +++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp @@ -334,6 +334,7 @@ layout (std140) uniform shader_data { vec4 const_color[NUM_TEV_STAGES]; vec4 tev_combiner_buffer_color; int alphatest_ref; + float depth_offset; }; uniform sampler2D tex[3]; @@ -360,7 +361,8 @@ void main() { out += ") discard;\n"; } - out += "color = last_tex_env_out;\n}"; + out += "color = last_tex_env_out;\n"; + out += "gl_FragDepth = gl_FragCoord.z + depth_offset;\n}"; return out; } |