Add option to disable shadows on transparent material

This commit is contained in:
2026-04-09 14:47:39 +02:00
parent 095cfcdde2
commit 1d3d20e6c5
6 changed files with 27 additions and 0 deletions
@@ -88,8 +88,12 @@ void PS_Forward(
gBuffer.ShadingModel = MATERIAL_SHADING_MODEL;
// Calculate lighting from a single directional light
#if LIGHTING_NO_SHADOW
float4 shadowMask = (float4)1;
#else
ShadowSample shadow = SampleDirectionalLightShadow(DirectionalLight, ShadowsBuffer, ShadowMap, gBuffer);
float4 shadowMask = GetShadowMask(shadow);
#endif
float4 light = GetLighting(ViewPos, DirectionalLight, gBuffer, shadowMask, false, false);
// Calculate lighting from sky light