playcanvas / playcanvas/engine

Potentially incorrect camera position used for directional light culling and shadow rendering in XR session

Open
#3,634 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: graphics area: xr
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.