add camera-facing midtexture shadows to dynamic lights, off by default due to fps hit

This commit is contained in:
Ricardo Luís Vaz Silva 2025-02-16 04:08:53 -03:00 committed by Magnus Norddahl
commit 961e74e0fa
8 changed files with 143 additions and 14 deletions

View file

@ -336,6 +336,7 @@ void VkRenderState::ApplyRenderPass(int dt)
pipelineKey.ShaderKey.UseShadowmap = gl_light_shadows == 1;
pipelineKey.ShaderKey.UseRaytrace = gl_light_shadows >= 2;
pipelineKey.ShaderKey.UseRaytracePrecise = gl_light_shadows >= 3;
pipelineKey.ShaderKey.PreciseMidtextureTrace = gl_precise_midtextures_trace;
pipelineKey.ShaderKey.ShadowmapFilter = std::clamp(int(gl_light_shadow_filter), 0, 15);
pipelineKey.ShaderKey.GBufferPass = mRenderTarget.DrawBuffers > 1;
@ -1091,6 +1092,7 @@ void VkRenderState::ApplyLevelMeshPipeline(VulkanCommandBuffer* cmdbuffer, VkPip
pipelineKey.ShaderKey.UseShadowmap = gl_light_shadows == 1;
pipelineKey.ShaderKey.UseRaytrace = gl_light_shadows >= 2;
pipelineKey.ShaderKey.UseRaytracePrecise = gl_light_shadows >= 3;
pipelineKey.ShaderKey.PreciseMidtextureTrace = gl_precise_midtextures_trace;
pipelineKey.ShaderKey.ShadowmapFilter = std::clamp(int(gl_light_shadow_filter), 0, 15);
pipelineKey.ShaderKey.GBufferPass = mRenderTarget.DrawBuffers > 1;