diff --git a/projects/voxelization/resources/shaders/shadowMapping.inc b/projects/voxelization/resources/shaders/shadowMapping.inc index c4bcd94e70766dfb4d403076f63007a37d3e868a..c56ae8985c5c5fcef780b622d8b888f1081af74c 100644 --- a/projects/voxelization/resources/shaders/shadowMapping.inc +++ b/projects/voxelization/resources/shaders/shadowMapping.inc @@ -86,7 +86,7 @@ float shadowTest(vec3 worldPos, LightInfo lightInfo, texture2D shadowMap, sample shadowMapSample = unquantizeMoments(shadowMapSample); float depthBias = 0.f; - float momentBias = 0.000002; + float momentBias = 0.0003; float shadow = ComputeMSMShadowIntensity(shadowMapSample, lightPos.z, depthBias, momentBias); return reduceLightBleeding(shadow, 0.1f); diff --git a/projects/voxelization/src/ShadowMapping.cpp b/projects/voxelization/src/ShadowMapping.cpp index 051d0673e5c92cbaa7ed86600e3dd85ab4cc3b98..19d58c25a6c8922e9333e584854b1894e08adfcf 100644 --- a/projects/voxelization/src/ShadowMapping.cpp +++ b/projects/voxelization/src/ShadowMapping.cpp @@ -1,10 +1,10 @@ #include "ShadowMapping.hpp" #include <vkcv/shader/GLSLCompiler.hpp> -const vk::Format shadowMapFormat = vk::Format::eR32G32B32A32Sfloat; -const vk::Format shadowMapDepthFormat = vk::Format::eD32Sfloat; -const uint32_t shadowMapResolution = 2048; -const vkcv::Multisampling msaa = vkcv::Multisampling::MSAA8X; +const vk::Format shadowMapFormat = vk::Format::eR16G16B16A16Unorm; +const vk::Format shadowMapDepthFormat = vk::Format::eD32Sfloat; +const uint32_t shadowMapResolution = 2048; +const vkcv::Multisampling msaa = vkcv::Multisampling::MSAA8X; vkcv::ShaderProgram loadShadowShader() { vkcv::ShaderProgram shader;