Record the depth bias again at each pass, as the viewport and scissor are, so a pass into a scaled shadow map never keeps an unscaled slope term.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
FIocker
2026-11-12 17:28:00 +01:00
committed by chrg6
parent 58efccd883
commit 5e71cee08c

View File

@@ -4315,7 +4315,8 @@ static int prepare_draw_ex(VkExec *ex, int prim, int32_t count, int restart, int
if (ex->in_pass && (w > ex->pass_w || h > ex->pass_h)) vk_exec_pass_end(ex);
if (!ex->in_pass) ex->rt_resolved = 0;
}
if (!ex->in_pass) ex->dirty |= VK_EXEC_DIRTY_VIEWPORT | VK_EXEC_DIRTY_SCISSOR;
// a new pass may have another scale (pass_scale): the viewport, the scissor and the slope bias (slope_bias) follow it
if (!ex->in_pass) ex->dirty |= VK_EXEC_DIRTY_VIEWPORT | VK_EXEC_DIRTY_SCISSOR | VK_EXEC_DIRTY_DEPTH_BIAS;
vk_exec_pass_begin(ex);
VkRect2D sc = vk_exec_scissor(ex);
if (!sc.extent.width || !sc.extent.height) return draw_skipped(ex, mesh, SK_SCISSOR);