playcanvas / playcanvas/engine
Potentially incorrect camera position used for directional light culling and shadow rendering in XR session
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 16.8k
- Forks
- 2k
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 222
Description
Description
If a script modifies the camera's local position while the camera is driven by the XR system during an active XR session and the scene contains a real-time directional light with cast shadows enabled, the position used when performing directional light culling and directional light shadow rendering is the one set by the script rather than the one computed by the XR system. As a result, directional light shadow mapping might break.
Expected
The XR system forces the camera's local position to the XR viewer position before rendering as described here.
The resulting position is subsequently used when performing directional light culling and directional light shadow rendering regardless of whether a script modifies the camera's local position.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are identified in the issue. Trace the XR camera position through directional light culling and shadow rendering, then verify that XR-computed positioning is used even when a script changes the camera's local position during an active XR session.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- ar-vr-xr, computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100