Custom Spotlight Calculation not working
Does anyone know how the inner spotlight angle for a spotlight in Unity's built-in render pipeline is calculated (since I can't set them manually)?
I fake spotlights with a custom shader based on billboards. The shader calculates the lighting like this:
Custom Spotlight Calculation not working
I fake spotlights with a custom shader based on billboards. The shader calculates the lighting like this:
Code (csharp):
- float3 IncomingLight(float3 surfaceNormal, Light light)
- {
- return saturate(dot(surfaceNormal, light.direction) * light.attenuation) * light.color;
- }
- float GeneralAttenuation(float normalizedDistance)
- {
- // return saturate(1.0 /...