Polygon offset (depth bias) is not mapped to Metal #18

Closed
opened 2026-11-26 14:42:39 +00:00 by github-bot · 1 comment
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-26 09:20 UTC · original

The depth bias fields of the rasterizer state are not passed to Metal (setDepthBias:slopeScale:clamp:). Decals and shadow maps will z-fight once the 3D world renders. Read the bias from the register image along with cull, depth and stencil.

**@⁠LakshanSivakumar** on GitHub · 2026-11-26 09:20 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/18) The depth bias fields of the rasterizer state are not passed to Metal (setDepthBias:slopeScale:clamp:). Decals and shadow maps will z-fight once the 3D world renders. Read the bias from the register image along with cull, depth and stencil.
github-bot 2026-11-26 14:42:39 +00:00
  • closed this issue
  • added the
    bug
    label
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 14:42:39 +00:00
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-26 10:53 UTC · original

Partial progress: #25 merged to main, so victory-metal now calls setDepthBias:slopeScale:clamp: on every draw (zero bias resets prior bias in the same pass).

Remaining work for this issue: decode the depth bias fields from the 0x1c8 register image into Graphics::guess_from for guessed pipelines.

**@⁠LakshanSivakumar** on GitHub · 2026-11-26 10:53 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/18#issuecomment-7189973764) Partial progress: #25 merged to `main`, so `victory-metal` now calls `setDepthBias:slopeScale:clamp:` on every draw (zero bias resets prior bias in the same pass). Remaining work for this issue: decode the depth bias fields from the 0x1c8 register image into `Graphics::guess_from` for guessed pipelines.
This discussion has been locked. Commenting is limited to contributors.
No description provided.