mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
allow spotlights specifically to comprress ies based on angle differentials
This commit is contained in:
parent
bbe9bc8871
commit
c27b9bf48f
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue