|
|
|
|
|
|
float3 L = -light.forward; // Lights point backwards in Unity |
|
|
|
|
|
|
|
float3 color; float attenuation; |
|
|
|
light.contactShadowIndex = -1; // Disable shadow contact if any |
|
|
|
EvaluateLight_Directional(context, posInput, light, unused, 0, L, |
|
|
|
color, attenuation); |
|
|
|
|
|
|
|
|
|
|
float3 L = -lightToSample * distRcp; |
|
|
|
|
|
|
|
float3 color; float attenuation; |
|
|
|
light.contactShadowIndex = -1; // Disable shadow contact if any |
|
|
|
EvaluateLight_Punctual(context, posInput, light, unused, |
|
|
|
0, L, lightToSample, distances, |
|
|
|
color, attenuation); |
|
|
|
|
|
|
float distProj = dot(lightToSample, light.forward); |
|
|
|
float4 distances = float4(1, 1, 1, distProj); |
|
|
|
|
|
|
|
float3 color; float attenuation; float attenuationNoContactShadows; |
|
|
|
float3 color; float attenuation; |
|
|
|
light.contactShadowIndex = -1; // Disable shadow contact if any |
|
|
|
EvaluateLight_Punctual( context, posInput, light, unused, |
|
|
|
0, L, lightToSample, distances, |
|
|
|
color, attenuation); |
|
|
|