ADD: Clipmap shadow better quality

This commit is contained in:
2025-10-26 06:57:13 +09:00
parent 3127658b01
commit 85d93fbd67
4 changed files with 100 additions and 27 deletions

View File

@@ -17,6 +17,7 @@
#include "core/asset_manager.h"
#include "render/vk_pipelines.h"
#include "core/vk_types.h"
#include "core/config.h"
void ShadowPass::init(EngineContext *context)
{
@@ -51,8 +52,8 @@ void ShadowPass::init(EngineContext *context)
// Static depth bias to help with surface acne (tune later)
b._rasterizer.depthBiasEnable = VK_TRUE;
b._rasterizer.depthBiasConstantFactor = 2.0f;
b._rasterizer.depthBiasSlopeFactor = 2.0f;
b._rasterizer.depthBiasConstantFactor = kShadowDepthBiasConstant;
b._rasterizer.depthBiasSlopeFactor = kShadowDepthBiasSlope;
b._rasterizer.depthBiasClamp = 0.0f;
};