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

Godot 4 Sky rotation applied in wrong order #69630

Closed
Malcolmnixon opened this issue Dec 6, 2022 · 2 comments · Fixed by #69636
Closed

Godot 4 Sky rotation applied in wrong order #69630

Malcolmnixon opened this issue Dec 6, 2022 · 2 comments · Fixed by #69636

Comments

@Malcolmnixon
Copy link
Contributor

Godot version

4.0 beta 7

System information

Windows 10, NVidia 2070, Vulkan Mobile

Issue description

Having a Sky in the environment (procedural or panorama) with a non-zero rotation around Y causes incorrect sky rotation. Rotating the sky around the Y axis is used usually to put the sun in a pleasing orientation for the scene. When the Y rotation is non-zero (say 180 degrees) rotating the camera causes the sky to rotate in an unexpected way.

Steps to reproduce

  1. Launch editor
  2. Create a test ground quad (to help keep track of the world coordinate space)
  3. Add a world environment with a procedural sky and a rotation of 0 around Y (default)
  4. Look around in the editor (middle button drag) and observe the sky looks as expected
  5. Rotate the sky by 180 degrees around Y
  6. Look around in the editor (middle button drag) and observe a whacky sky (looking down shows the sky and looking up shows the ground).

The following is a video demonstrating the issue - https://www.youtube.com/watch?v=9sDD--lhFNg

Minimal reproduction project

N/A - trivially reproducible

@Calinou
Copy link
Member

Calinou commented Dec 6, 2022

#61859 attempted to fix a similar issue, but maybe it wasn't exactly the same problem.

cc @Chaosus

@Malcolmnixon
Copy link
Contributor Author

I've verified the problem is only in the mobile renderer and the forward_plus render works correctly. The forward_plus SkyRD::draw function applies the transforms in the correct order from #61859; however the mobile functions SkyRD::update_res_buffers and SkyRD::draw have them in the incorrect order from before the PR.

I'm assembling a PR now which applies the #61859 transform-order fix to the mobile renderer.

@akien-mga akien-mga moved this from To Assess to In Progress in 4.x Priority Issues Dec 6, 2022
Repository owner moved this from In Progress to Done in 4.x Priority Issues Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants