mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-14 08:12:16 +00:00
Enabling Depth Bias Explicity (#2766)
This commit is contained in:
parent
e3b1c041d0
commit
5abec2a291
1 changed files with 4 additions and 5 deletions
|
@ -1096,14 +1096,13 @@ void Rasterizer::UpdateDepthStencilState() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto depth_bias_enabled = regs.polygon_control.NeedsBias();
|
const auto depth_bias_enabled = regs.polygon_control.NeedsBias();
|
||||||
|
dynamic_state.SetDepthBiasEnabled(depth_bias_enabled);
|
||||||
if (depth_bias_enabled) {
|
if (depth_bias_enabled) {
|
||||||
|
const bool front = regs.polygon_control.enable_polygon_offset_front;
|
||||||
dynamic_state.SetDepthBias(
|
dynamic_state.SetDepthBias(
|
||||||
regs.polygon_control.enable_polygon_offset_front ? regs.poly_offset.front_offset
|
front ? regs.poly_offset.front_offset : regs.poly_offset.back_offset,
|
||||||
: regs.poly_offset.back_offset,
|
|
||||||
regs.poly_offset.depth_bias,
|
regs.poly_offset.depth_bias,
|
||||||
(regs.polygon_control.enable_polygon_offset_front ? regs.poly_offset.front_scale
|
(front ? regs.poly_offset.front_scale : regs.poly_offset.back_scale) / 16.f);
|
||||||
: regs.poly_offset.back_scale) /
|
|
||||||
16.f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto stencil_test_enabled =
|
const auto stencil_test_enabled =
|
||||||
|
|
Loading…
Add table
Reference in a new issue