Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HDRP] Fixed box shape spotlight range attenuation does not work in volumetric lighting #8101

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ VoxelLighting EvaluateVoxelLightingLocal(LightLoopContext context, uint groupIdx
float3 L = -light.forward;
float3 lightToSample = posInput.positionWS - light.positionRWS;
float distProj = dot(lightToSample, light.forward);
float4 distances = float4(1, 1, 1, distProj);
float4 distances = float4(distProj, distProj * distProj, 1.0f, distProj);

float4 lightColor = EvaluateLight_Punctual(context, posInput, light, L, distances);
// The volumetric light dimmer, unlike the regular light dimmer, is not pre-multiplied.
Expand Down
Loading