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

Out of sync VR camera with lens flares #9826

Open
SimonTrushkin opened this issue Jan 21, 2021 · 4 comments
Open

Out of sync VR camera with lens flares #9826

SimonTrushkin opened this issue Jan 21, 2021 · 4 comments

Comments

@SimonTrushkin
Copy link

SimonTrushkin commented Jan 21, 2021

Forum
https://forum.babylonjs.com/t/vr-and-lens-flares/17665

Repro

Screenshots
https://aws1.discourse-cdn.com/business7/uploads/babylonjs/optimized/2X/0/0edfcc03e06a676912a81bd3fa3fe84ec97e5d51_2_657x500.jpeg

Device
Oculus Quest 2

@RaananW
Copy link
Member

RaananW commented Jan 21, 2021

According to my tests (and the attached image) - lens flare was added to both cameras.

This is not a bug, but the right behavior according to the current implementation. The problem is that each camera has a different position and rotation, so the lens flare is positioned incorrectly when viewed in a headset (each eye sees something else, it feels very odd).
The camera that should be used to calculate the lens flare's positions is the xr camera and not the rig camera. The rig camera should only render.

@RaananW RaananW added this to the 5.0 milestone Jan 21, 2021
@RaananW RaananW self-assigned this Jan 21, 2021
@SimonTrushkin
Copy link
Author

@RaananW Yes, I'm sorry, I put it wrong, flares really added to both cameras but attached to only one (on second camera flares are rendered like at first camera how i understand).

@RaananW
Copy link
Member

RaananW commented Sep 15, 2021

This feature, together with others like post processing (god rays is a good example) require the projection layer of the layer API to work correctly - #10588 . Once integrated this issue will be dealt with

@RaananW RaananW modified the milestones: 5.0, 6.0 Feb 16, 2022
@thomlucc thomlucc modified the milestones: 6.0, 7.0 Feb 16, 2023
@RaananW RaananW modified the milestones: 7.0, Future Feb 29, 2024
@thomlucc thomlucc modified the milestones: Future, 8.0 Mar 12, 2024
Copy link

This issue has been automatically staled because it has been inactive for more than 14 days. Please update to "unstale".

@github-actions github-actions bot added the stale label Mar 28, 2024
@thomlucc thomlucc modified the milestones: 8.0, Future Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants