diff options
author | Jannik Vogel <email@jannikvogel.de> | 2016-03-30 19:27:04 +0200 |
---|---|---|
committer | Jannik Vogel <email@jannikvogel.de> | 2016-05-10 08:58:52 +0200 |
commit | fc9cc21024bff71d98e0106c9d0fd0476ab3c17e (patch) | |
tree | 24e0cce21a87dc1074d57982efc06af6da01e663 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | Pica: Implement W-Buffer in SW rasterizer (diff) | |
download | yuzu-fc9cc21024bff71d98e0106c9d0fd0476ab3c17e.tar yuzu-fc9cc21024bff71d98e0106c9d0fd0476ab3c17e.tar.gz yuzu-fc9cc21024bff71d98e0106c9d0fd0476ab3c17e.tar.bz2 yuzu-fc9cc21024bff71d98e0106c9d0fd0476ab3c17e.tar.lz yuzu-fc9cc21024bff71d98e0106c9d0fd0476ab3c17e.tar.xz yuzu-fc9cc21024bff71d98e0106c9d0fd0476ab3c17e.tar.zst yuzu-fc9cc21024bff71d98e0106c9d0fd0476ab3c17e.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 5fc885961..d1d9beccb 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -260,6 +260,11 @@ void RasterizerOpenGL::NotifyPicaRegisterChanged(u32 id) { SyncDepthModifiers(); break; + // Depth buffering + case PICA_REG_INDEX(depthmap_enable): + shader_dirty = true; + break; + // Blending case PICA_REG_INDEX(output_merger.alphablend_enable): SyncBlendEnabled(); @@ -910,10 +915,10 @@ void RasterizerOpenGL::SyncCullMode() { } void RasterizerOpenGL::SyncDepthModifiers() { - float depth_scale = -Pica::float24::FromRaw(Pica::g_state.regs.viewport_depth_range).ToFloat32(); - float depth_offset = Pica::float24::FromRaw(Pica::g_state.regs.viewport_depth_near_plane).ToFloat32() / 2.0f; + float depth_scale = Pica::float24::FromRaw(Pica::g_state.regs.viewport_depth_range).ToFloat32(); + float depth_offset = Pica::float24::FromRaw(Pica::g_state.regs.viewport_depth_near_plane).ToFloat32(); - // TODO: Implement scale modifier + uniform_block_data.data.depth_scale = depth_scale; uniform_block_data.data.depth_offset = depth_offset; uniform_block_data.dirty = true; } |