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.
This commit is contained in:
Kelsi 2026-03-11 12:21:07 -07:00
parent 6426bde7ea
commit 508b7e839b

View file

@ -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<Camera>();
// 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));