mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-14 08:12:16 +00:00
Fix depth bias (#1538)
This commit is contained in:
parent
ce158290fb
commit
e1fecda74f
1 changed files with 6 additions and 8 deletions
|
@ -393,14 +393,12 @@ void Rasterizer::UpdateDynamicState(const GraphicsPipeline& pipeline) {
|
||||||
if (regs.depth_control.depth_bounds_enable) {
|
if (regs.depth_control.depth_bounds_enable) {
|
||||||
cmdbuf.setDepthBounds(regs.depth_bounds_min, regs.depth_bounds_max);
|
cmdbuf.setDepthBounds(regs.depth_bounds_min, regs.depth_bounds_max);
|
||||||
}
|
}
|
||||||
if (regs.polygon_control.NeedsBias()) {
|
if (regs.polygon_control.enable_polygon_offset_front) {
|
||||||
if (regs.polygon_control.enable_polygon_offset_front) {
|
cmdbuf.setDepthBias(regs.poly_offset.front_offset, regs.poly_offset.depth_bias,
|
||||||
cmdbuf.setDepthBias(regs.poly_offset.front_offset, regs.poly_offset.depth_bias,
|
regs.poly_offset.front_scale / 16.f);
|
||||||
regs.poly_offset.front_scale);
|
} else if (regs.polygon_control.enable_polygon_offset_back) {
|
||||||
} else {
|
cmdbuf.setDepthBias(regs.poly_offset.back_offset, regs.poly_offset.depth_bias,
|
||||||
cmdbuf.setDepthBias(regs.poly_offset.back_offset, regs.poly_offset.depth_bias,
|
regs.poly_offset.back_scale / 16.f);
|
||||||
regs.poly_offset.back_scale);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (regs.depth_control.stencil_enable) {
|
if (regs.depth_control.stencil_enable) {
|
||||||
const auto front = regs.stencil_ref_front;
|
const auto front = regs.stencil_ref_front;
|
||||||
|
|
Loading…
Add table
Reference in a new issue