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

Vulkan: LightmapGI environment lighting samples the sky upside-down #56079

Closed
Tracked by #56033
Calinou opened this issue Dec 20, 2021 · 1 comment · Fixed by #56208
Closed
Tracked by #56033

Vulkan: LightmapGI environment lighting samples the sky upside-down #56079

Calinou opened this issue Dec 20, 2021 · 1 comment · Fixed by #56208

Comments

@Calinou
Copy link
Member

Calinou commented Dec 20, 2021

Godot version

4.0.dev (8485d0c)

System information

Fedora 34, GeForce GTX 1080 (NVIDIA 470.74)

Issue description

When using LightmapGI, Environment lighting is sampled upside down, regardless of the mesh's rotation. In most scenes, this causes environment lighting to be darker than expected when viewed from above, and brighter than expected when viewed from below.

Left: Real-time ambient light, right: baked ambient light

2021-12-20_01 00 01

2021-12-20_01 00 19

Steps to reproduce

  • Add a WorldEnvironment node with a PanoramaSkyMaterial.
  • Add a DirectionalLight and set its Energy to 0, so that the preview light is disabled and it does not intefere with baking.
  • Add a LightmapGI node. Set the environment mode to Scene.
  • Instance two identical 3D scenes imported with the Static Lightmaps option. Right-click one of them in the Scene tree dock then enable Editable Children. Select its child mesh and set Global Illumination > Mode to Disabled, so that it is not included in baking. This step is not required, but it's useful to compare real-time ambient lighting with baked ambient lighting.
  • Select the LightmapGI node and click Bake at the top of the 3D editor viewport.

Minimal reproduction project

test_lightmap_environment_upside_down.zip

@williamd67
Copy link
Contributor

williamd67 commented Dec 21, 2021

It looks like that the panorama texture is upside down (see picture). I do not know if that is as expected, if so the code need to correct for that, else we have to verify why this texture is like this.
Screenshot from 2021-12-21 21-57-01

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.

2 participants