Skip to content
Snippets Groups Projects
Commit 88fa1a47 authored by Alexander Gauggel's avatar Alexander Gauggel
Browse files

[#82] Switch to 16 bit shadow map to save on performance

parent ffad5823
No related branches found
No related tags found
1 merge request!70Resolve "Voxel cone tracing"
Pipeline #26034 passed
......@@ -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);
......
#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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment