Add alpha-tested foliage shadows: per-batch texture binding and shadow map receiving

Shadow casting: foliage batches now bind their actual texture in the shadow
pass with alpha testing, producing leaf-shaped shadows instead of solid cards.
Uses a per-frame resettable descriptor pool for texture sets.

Shadow receiving: foliage fragments now sample the shadow map with PCF
instead of using a flat constant darkening.
This commit is contained in:
Kelsi 2026-02-23 05:55:03 -08:00
parent 6fc2c36dae
commit 77012adbc6
4 changed files with 106 additions and 30 deletions

View file

@ -326,6 +326,8 @@ private:
VkDescriptorSet shadowParamsSet_ = VK_NULL_HANDLE;
::VkBuffer shadowParamsUBO_ = VK_NULL_HANDLE;
VmaAllocation shadowParamsAlloc_ = VK_NULL_HANDLE;
// Per-frame pool for foliage shadow texture descriptor sets
VkDescriptorPool shadowTexPool_ = VK_NULL_HANDLE;
// Particle pipelines
VkPipeline particlePipeline_ = VK_NULL_HANDLE; // M2 emitter particles