mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-19 19:14:48 +00:00
Enabling Depth Bias Explicity (#2766)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
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();
|
||||
dynamic_state.SetDepthBiasEnabled(depth_bias_enabled);
|
||||
if (depth_bias_enabled) {
|
||||
const bool front = regs.polygon_control.enable_polygon_offset_front;
|
||||
dynamic_state.SetDepthBias(
|
||||
regs.polygon_control.enable_polygon_offset_front ? regs.poly_offset.front_offset
|
||||
: regs.poly_offset.back_offset,
|
||||
front ? regs.poly_offset.front_offset : regs.poly_offset.back_offset,
|
||||
regs.poly_offset.depth_bias,
|
||||
(regs.polygon_control.enable_polygon_offset_front ? regs.poly_offset.front_scale
|
||||
: regs.poly_offset.back_scale) /
|
||||
16.f);
|
||||
(front ? regs.poly_offset.front_scale : regs.poly_offset.back_scale) / 16.f);
|
||||
}
|
||||
|
||||
const auto stencil_test_enabled =
|
||||
|
|
Loading…
Add table
Reference in a new issue