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

Shadow Caster Mask does not affect LightmapGI baking for lights with Static bake mode #98684

Open
Tracked by #56033
Calinou opened this issue Oct 31, 2024 · 0 comments
Open
Tracked by #56033

Comments

@Calinou
Copy link
Member

Calinou commented Oct 31, 2024

Tested versions

System information

Godot v4.4.dev (7187c25) - Fedora Linux 41 (KDE Plasma) on X11 - X11 display driver, Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (nvidia; 560.35.03) - 13th Gen Intel(R) Core(TM) i9-13900K (32 threads)

Issue description

The Light3D Shadow Caster Mask property does not affect lights with Static bake mode when baking lightmaps.

Like #56611, this may be considered to be intended (as disabling shadow casting for certain objects may be done for performance reasons, which is a moot point for an offline baking process). However, this can be an issue if the shadow casting is disabled for aesthetic reasons or for accurate shadowmask baking (for DirectionalLight3D).

Real-time light

Real-time

Baked light with Static bake mode

Notice how some objects that previously didn't cast shadows now cast shadows.

Baked

Steps to reproduce

  • Create meshes, some on visual layer 1, some on visual layer 2.
  • Create lights with shadows enabled. Set their shadow caster mask to affect only layer 1.
  • Set lights to Static bake mode. Before baking, notice that certain objects don't cast shadows (which is expected).
  • Bake lightmaps. Notice how all objects cast shadows now.

Minimal reproduction project (MRP)

test_shadow_caster_mask_lightmap.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant