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

Volumetric fog is shifted in screenspace when XR is enabled on the viewport. #72331

Closed
luzader opened this issue Jan 29, 2023 · 3 comments · Fixed by #78436
Closed

Volumetric fog is shifted in screenspace when XR is enabled on the viewport. #72331

luzader opened this issue Jan 29, 2023 · 3 comments · Fixed by #78436

Comments

@luzader
Copy link
Contributor

luzader commented Jan 29, 2023

Godot version

4.0beta16

System information

Windows 10, Vulkan API 1.3.205, NVIDIA - NVIDIA GeForce RTX 3080, Valve Index, Steam VR

Issue description

When XR is enabled FogVolumes (and probably all volumetric fog but it is not obvious for large homogenous volumes) are rendered to the wrong location in both eyes once XR is enabled on the viewport. Here's a unit-cube dense fog volume stacked between two mesh cubes.

Here it is correctly positioned in the editor:
Screenshot 2023-01-29 122055
But once XR is enabled on the viewport, the volume is shifted to the left in the left eye and to the right in the right eye:
Screenshot_Sun_Jan_29_12-19-34_2023_VR

It is also shifted to the left in the main game window (presumably because the game window is rendering the left eye).

The shift is in screenspace as you can see if I rotate my head:
Screenshot_Sun_Jan_29_12-19-41_2023_VR

Steps to reproduce

Create a small fog volume and enable XR on the viewport.
I have also observed this on large fog volumes if using a fog shader which creates small clumps of fog, the clumps are shifted wrongly which breaks stereopsis .

Minimal reproduction project

FogVolume.zip

@BastiaanOlij
Copy link
Contributor

Fog is indeed still on the list of effects to add stereo support for

@jakes1403
Copy link

Would this be fixed by the time 4.0.0 is fully released?

@Calinou
Copy link
Member

Calinou commented Feb 23, 2023

Would this be fixed by the time 4.0.0 is fully released?

No, as this is technically a missing feature for XR (the current implementation of volumetric fog wasn't designed to account for XR).

In the meantime, you can use the good old fake volumetric fog approach using transparent billboards with a StandardMaterial3D that has Proximity Fade and Distance Fade enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants