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 Mobile: LightmapGI baking makes environment light twice as dark as it should be #94401

Open
Tracked by #55871 ...
Calinou opened this issue Jul 15, 2024 · 2 comments

Comments

@Calinou
Copy link
Member

Calinou commented Jul 15, 2024

Tested versions

  • Reproducible in: 4.3.beta 92c8e87

System information

Godot v4.3.beta (92c8e87) - Fedora Linux 40 (KDE Plasma) - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (nvidia; 555.58.02) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)

Issue description

LightmapGI baking in Forward Mobile makes environment light twice as dark as it should be.
This means that the visual outcome of lightmap baking is different, even if you view the lightmaps in the same rendering method:

Forward+ bake (seen in Compatibility) Mobile bake (seen in Compatibility)1 Compatibility bake2
Screenshot_20240715_220255_forward_plus png webp Screenshot_20240715_220407_mobile png webp Screenshot_20240715_220232_compatibility png webp

Environment baking in Mobile was added in #85793. I assume it's missing the 2.0 exposure multiplier that we use elsewhere, e.g. for real-time sky reflections: #55878

cc @Lasuch69

Steps to reproduce

  • Bake lightmaps in Forward+. Run the scene and look at the results.
  • Switch to the Mobile rendering method. Restart the editor and bake lightmaps.
  • Switch to the Forward+ rendering method. Run the scene without baking lightmaps and look at the results. Notice how the scene now looks darker overall, particularly in areas that only receive baked environment lighting.

Minimal reproduction project (MRP)

test_lightmapper_rendering_methods.zip

Footnotes

  1. Glowing material emission is missing due to https://github.com/godotengine/godot/issues/94406.

  2. This uses Forward+ for baking on desktop platforms, Mobile on mobile platforms if I'm not mistaken.

@Lasuch69
Copy link
Contributor

Lasuch69 commented Sep 5, 2024

Where this exposure multiplier is exactly?

I cannot find it, even in forward clustered.

@clayjohn
Copy link
Member

clayjohn commented Sep 5, 2024

Its defined here:

layout(constant_id = 15) const float sc_luminance_multiplier = 2.0;

Here is where it is used for skies:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Up for grabs
Development

No branches or pull requests

3 participants