mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 08:15:59 -10:00
Vulkan: match OpenGL's depth bias in the shadow map pass (#7944)
OpenGL's shadow pass calls gr_zbias(-1024), which sets a polygon offset of factor 1, units 1024 (gropengltnl.cpp, gropengl.cpp). The Vulkan shadow pass set a constant bias of -1024 with no slope term: the opposite sign, on a depth buffer that uses the same less-than test. Use OpenGL's values. Co-authored-by: Dustinspace217 <[email protected]>
This commit is contained in:
1 parent
e66fe223bf
commit
246a6ee8f0
1 file changed
+1
-1
@@ -748,7 +748,7 @@ void VulkanDrawManager::renderShadowDraw(gr_buffer_handle ubo_handle, size_t ubo
|
||||
}
|
||||
|
||||
stateTracker->bindPipeline(pipeline, pipelineManager->getPipelineLayout());
|
||||
stateTracker->setDepthBias(-1024.0f, 0.0f);
|
||||
stateTracker->setDepthBias(1024.0f, 1.0f); // GL shadow pass: gr_zbias(-1024) = polygon offset factor 1, units 1024
|
||||
|
||||
// Bind descriptor sets: shadowMapData (per-draw) and shadowCascadeParams
|
||||
// (bound separately, per-frame, via shadow_cascade_params_bind) both live in
|
||||
|
||||
Reference in new issue
Block a user