godotengine / godotengine/godot

LightmapGI baking: Environment mode scene fails to use ambient light when the environment light source is a color.

Open
#116,338 0 comments 0 reactions 0 assignees View on GitHub
bug topic:3d topic:rendering
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

4.7 dev 1

### System information

Windows, Forward+, D3D12

### Issue description

Lightmap baking does not use the ambient light in this specific configuration - did not test other configurations, but the default one with sky lighting works correctly.

### Steps to reproduce

1. Create a new 3D scene, disable preview light, add environment, a LightmapGI and a cube mesh, then generate UV2s on the mesh.
2. In the environment, set the ambient light source to color, and set the color to white.
3. Bake the lightmaps.
4. Toggle the lightmaps on and off using node visibility - note how the cube is significantly darker when the lightmaps are on. They seem to use the sky.
5. In the lightmaps, setting environment mode to custom color and using the intended color produces the correct result.

### Minimal reproduction project (MRP)

I feel like the repdocution steps should be sufficient.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.