mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-18 09:58:19 -05:00
Pica: Implement W-Buffer in SW rasterizer
This commit is contained in:
@ -256,7 +256,7 @@ void RasterizerOpenGL::NotifyPicaRegisterChanged(u32 id) {
|
||||
|
||||
// Depth modifiers
|
||||
case PICA_REG_INDEX(viewport_depth_range):
|
||||
case PICA_REG_INDEX(viewport_depth_far_plane):
|
||||
case PICA_REG_INDEX(viewport_depth_near_plane):
|
||||
SyncDepthModifiers();
|
||||
break;
|
||||
|
||||
@ -911,7 +911,7 @@ 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_far_plane).ToFloat32() / 2.0f;
|
||||
float depth_offset = Pica::float24::FromRaw(Pica::g_state.regs.viewport_depth_near_plane).ToFloat32() / 2.0f;
|
||||
|
||||
// TODO: Implement scale modifier
|
||||
uniform_block_data.data.depth_offset = depth_offset;
|
||||
|
Reference in New Issue
Block a user