Added AdvanceScope;

Added energy conservation to diffuse lighting;
Clean up shader properties;
This commit is contained in:
2025-03-23 21:30:34 +09:00
parent ea3e83157c
commit b205c1523d
14 changed files with 97 additions and 321 deletions

View File

@@ -87,8 +87,7 @@ void UtsLightLoop(FragInputs fragInputs, PositionInputs posInput, UtsBSDFData bs
float3 L = -light.forward;
// Is it worth sampling the shadow map?
if ((light.lightDimmer > 0) && (light.shadowDimmer > 0) && // Note: Volumetric can have different dimmer, thus why we test it here
dot(bsdfData.normalWS, L) > 0.0)
if ((light.lightDimmer > 0) && (light.shadowDimmer > 0))
{
context.shadowValue = GetDirectionalShadowAttenuation(context.shadowContext,
posInput.positionSS, posInput.positionWS + L * _ShadowDistanceBias, UtsGetShadowNormal(bsdfData),