Support directional lights with disabled shadows
Signed-off-by: Santi Paprika <santi.gonzalez.cs@gmail.com>
This commit is contained in:
+3
-3
@@ -58,7 +58,7 @@ void ApplyDirectionalLights(Surface surface, inout LightingData lightingData)
|
||||
// [GFX TODO][ATOM-2012] care of multiple directional light
|
||||
// Currently shadow check is done only for index == shadowIndex.
|
||||
float currentLitRatio = 1.0f;
|
||||
float currentTransmissionParameter = 1.0f;
|
||||
float currentTransmissionParameter = (o_transmission_mode == TransmissionMode::ThickObject) ? 0.0f : 9999.0f;
|
||||
if (o_enableShadows)
|
||||
{
|
||||
bool activeLight = index == shadowIndex;
|
||||
@@ -66,12 +66,12 @@ void ApplyDirectionalLights(Surface surface, inout LightingData lightingData)
|
||||
if (o_transmission_mode == TransmissionMode::ThickObject)
|
||||
{
|
||||
// Back shadow ratio (add contribution only if current directional light is the active one for shadows)
|
||||
currentTransmissionParameter = activeLight ? backShadowRatio : 0.;
|
||||
currentTransmissionParameter = activeLight ? backShadowRatio : 0.0f;
|
||||
}
|
||||
else if (o_transmission_mode == TransmissionMode::ThinObject)
|
||||
{
|
||||
// Transmission distance (add contribution only if current directional light is the active one for shadows)
|
||||
currentTransmissionParameter = activeLight ? transmissionDistance : 9999.f;
|
||||
currentTransmissionParameter = activeLight ? transmissionDistance : 9999.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user