Punctual Light ranges are wrong in HDRP when XR is enabled


When XR is enabled, my punctual lights are not rendering when their world space position is further than their range, essentially culling the lights as if the camera is always at (0,0,0). So for example if I move both the light and the camera to about (500, 0, 500) then I must set the light’s range to something over 500 for it to render. The scene view camera works correctly, and if I toggle XR rendering off the same camera works fine as well.

Hi, it looks like a bug.
Looks like something that could related to camera relative rendering.
In shader config package of HDRP there is a way to disable camera relative rendering which could allow to confirm it come from this (and could unlock you the time we find the issue).


What is you version and your device? thanks

This was a bug in the version of the High Definition Rendering Pipeline I was using at the time. Seems to have been fixed by updating to a newer version. For future reference the problem area seemed to appear within the camera relative light position in LightLoop.hlsl where the light loop function called ApplyCameraRelativeXR(posInput.positionWS) with the following comment:

" With XR single-pass and camera-relative: offset position to do lighting computations from the combined center view (original camera matrix). This is required because there is only one list of lights generated on the CPU. Shadows are also generated once and shared between the instanced views."