ADD: CSM with base shadow map 2
This commit is contained in:
@@ -45,7 +45,7 @@ void ShadowPass::init(EngineContext *context)
|
||||
b.set_cull_mode(VK_CULL_MODE_BACK_BIT, VK_FRONT_FACE_CLOCKWISE);
|
||||
b.set_multisampling_none();
|
||||
b.disable_blending();
|
||||
// Reverse-Z depth test for shadow maps (clear=0.0, GREATER_OR_EQUAL)
|
||||
|
||||
b.enable_depthtest(true, VK_COMPARE_OP_GREATER_OR_EQUAL);
|
||||
b.set_depth_format(VK_FORMAT_D32_SFLOAT);
|
||||
|
||||
@@ -85,7 +85,6 @@ void ShadowPass::register_graph(RenderGraph *graph, std::span<RGImageHandle> cas
|
||||
RGPassType::Graphics,
|
||||
[shadowDepth](RGPassBuilder &builder, EngineContext *ctx)
|
||||
{
|
||||
// Reverse-Z depth clear to 0.0
|
||||
VkClearValue clear{}; clear.depthStencil = {0.f, 0};
|
||||
builder.write_depth(shadowDepth, true, clear);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user