allow spotlights specifically to comprress ies based on angle differentials

This commit is contained in:
AzaezelX 2024-02-23 01:28:15 -06:00
parent bbe9bc8871
commit c27b9bf48f
2 changed files with 2 additions and 2 deletions

View file

@ -165,7 +165,7 @@ void main()
// Lookup the cookie sample.d
float cosTheta = dot(-surfaceToLight.L, lightDirection);
float angle = acos(cosTheta) * ( M_1OVER_PI_F);
float iesMask = texture(iesProfile, angle).r;
float iesMask = texture(iesProfile, angle/(lightSpotParams.x-lightSpotParams.y)).r;
// Multiply the light with the iesMask tex.
shadow *= iesMask;
#endif

View file

@ -163,7 +163,7 @@ float4 main( ConvexConnectP IN ) : SV_TARGET
// Lookup the cookie sample.d
float cosTheta = dot(-surfaceToLight.L, lightDirection);
float angle = acos(cosTheta) * ( M_1OVER_PI_F);
float iesMask = TORQUE_TEX1D(iesProfile, angle).r;
float iesMask = TORQUE_TEX1D(iesProfile, angle/(lightSpotParams.x-lightSpotParams.y)).r;
// Multiply the light with the iesMask tex.
shadow *= iesMask;
#endif