Skip to content

OpenGL: Baking lightmaps has broken emissive material properties #94406

@Calinou

Description

@Calinou

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

Baking lightmaps has broken emissive material properties if done while using the Compatibility rendering method. Rendering lightmaps that were baked while using Forward+ or Mobile looks correct.

Denoising is disabled in the comparisons below, but the issue remains with the denoiser enabled.

From left to right: Boxes with Emission Energy set to 1.0, then 0.5, then 10.0

Forward+ bake (seen in Compatibility) Compatibility bake
Forward+ Compatibility

This also affects the generated lightmap probes, which you can check in the MRP by looking above the boxes in the editor with the LightmapGI node selected.

This issue can be seen in a less extreme fashion in #94401, where the green emissive lighting is entirely missing in Compatibility, even though it renders correctly if lightmaps were baked while using Forward+.

Steps to reproduce

  • Create a MeshInstance3D with a PrimitiveMesh that has Add UV2 enabled, and give it an emissive material.
  • Add a second mesh (also with Add UV2) so that the result of emissive lighting can be seen on some surface.
  • Bake lightmaps while using the Compatibiltiy rendering method.

Minimal reproduction project (MRP)

test_lightmap_emissive.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions