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 with Directional enabled exhibits negative-colored specular reflections on metallic materials #81556

Closed
Tracked by #56033
Calinou opened this issue Sep 11, 2023 · 1 comment · Fixed by #95888

Comments

@Calinou
Copy link
Member

Calinou commented Sep 11, 2023

Godot version

4.2.dev 221884e

System information

Godot v4.2.dev (221884e) - Fedora Linux 38 (KDE Plasma) - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (nvidia; 535.104.05) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)

Issue description

LightmapGI with Directional enabled exhibits negative-colored specular reflections on metallic materials:

Screenshot_20230911_233509

Screenshot_20230911_233555

This doesn't occur at low metallic values, even if roughness is kept to 0.0:

Screenshot_20230911_233527

Disabling environment baking in LightmapGI doesn't resolve the issue.

Steps to reproduce

  • Create a MeshInstance3D with a metallic smooth material, and another one with a rough emissive material (or a bright material that reflects light).
  • Enable Directional in LightmapGI. Bake lightmaps.
  • Notice how reflections will take the opposite color of the light reflected by the other node.

Minimal reproduction project

test_lightmap_directional_metallic.zip

@clayjohn
Copy link
Member

This comes from our fake code to add a little bit of specular from the lightmaps. The code produces invalid values when used with a directional light. I would just remove it entirely

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