|
@@ -18,12 +18,11 @@ float computeDistanceLightFalloff(vec3 lightOffset, float lightDistanceSquared,
|
|
|
return lightDistanceFalloff;
|
|
|
}
|
|
|
|
|
|
-float computeDirectionalLightFalloff(vec3 lightDirection, vec3 directionToLightCenterW, float lightAngle, float exponent)
|
|
|
+float computeDirectionalLightFalloff(vec3 lightDirection, vec3 directionToLightCenterW, float cosHalfAngle, float exponent)
|
|
|
{
|
|
|
float falloff = 0.0;
|
|
|
|
|
|
#ifdef USEPHYSICALLIGHTFALLOFF
|
|
|
- float cosHalfAngle = cos(lightAngle * 0.5);
|
|
|
const float kMinusLog2ConeAngleIntensityRatio = 6.64385618977; // -log2(0.01)
|
|
|
|
|
|
// Calculate a Spherical Gaussian (von Mises-Fisher distribution, not angle-based Gaussian) such that the peak is in the light direction,
|