Skip to content

Commit

Permalink
Fixed box shape spotlight range attenuation does not work in volumetr…
Browse files Browse the repository at this point in the history
…ic lighting
  • Loading branch information
Minghou-Lei authored Sep 23, 2024
1 parent abbd6a5 commit 9c4058b
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 9c4058b

Please sign in to comment.