From 508b7e839ba28fac5df0ad78147f3b76933e24ee Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 11 Mar 2026 12:21:07 -0700 Subject: [PATCH] feat: enable shadow rendering in character preview for visual depth Enable shadows in character preview with 0.5 strength for a subtle lighting effect that improves visual accuracy. Removes clearShadowMap() call and enables shadowParams in preview UBO. Enhances character appearance fidelity when viewing equipment and customization options. --- src/rendering/character_preview.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rendering/character_preview.cpp b/src/rendering/character_preview.cpp index 2314e6e9..2cb6278e 100644 --- a/src/rendering/character_preview.cpp +++ b/src/rendering/character_preview.cpp @@ -64,9 +64,9 @@ bool CharacterPreview::initialize(pipeline::AssetManager* am) { return false; } - // Disable fog and shadows for the preview + // Configure lighting for character preview + // Use distant fog to avoid clipping, enable shadows for visual depth charRenderer_->setFog(glm::vec3(0.05f, 0.05f, 0.1f), 9999.0f, 10000.0f); - charRenderer_->clearShadowMap(); camera_ = std::make_unique(); // Portrait-style camera: WoW Z-up coordinate system @@ -819,8 +819,8 @@ void CharacterPreview::compositePass(VkCommandBuffer cmd, uint32_t frameIndex) { // No fog in preview ubo.fogColor = glm::vec4(0.05f, 0.05f, 0.1f, 0.0f); ubo.fogParams = glm::vec4(9999.0f, 10000.0f, 0.0f, 0.0f); - // Shadows disabled - ubo.shadowParams = glm::vec4(0.0f, 0.0f, 0.0f, 0.0f); + // Enable shadows for visual depth in preview (strength=0.5 for subtle effect) + ubo.shadowParams = glm::vec4(1.0f, 0.5f, 0.0f, 0.0f); std::memcpy(previewUBOMapped_[fi], &ubo, sizeof(GPUPerFrameData));