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

Metallic material is black in shadows when the material uses per-vertex shading #103627

Open
Regrad opened this issue Mar 5, 2025 · 4 comments
Open

Comments

@Regrad
Copy link

Regrad commented Mar 5, 2025

Tested versions

Reproducible in Godot 4.4 Stable
Not reproducible in Godot 4.3 Stable

System information

Windows 11

Issue description

Texture with 100% Metallic in the shadow behaves strangely and becomes completely black. In the previous version there was no such problem.

Godot 4.4:
Image

Godot 4.3:

Image

Steps to reproduce

Create a WorldEnvironment with a sky, create a DirectionalLight3D with shadows enabled, create an object with 100% metallicity and put this object in shadow.

Minimal reproduction project (MRP)

A similar project can be reproduced by anyone within 1 minute.

@AThousandShips
Copy link
Member

Cannot replicate with these steps, it renders correctly in both cases, please upload an MRP to help test this and confirm all the reproduction steps

@Regrad
Copy link
Author

Regrad commented Mar 5, 2025

Correction. This happens when setting the parameter force_vertex_shading.

New_project.zip

@matheusmdx
Copy link
Contributor

With the MRP i was able to reproduce the issue, the culprit is pr #83360. The problem wasn't visible in 4.4 dev 2 and before because vertex shading wasn't implemented in this version. Only affect Forward+ and Mobile renders.

CC @ywmaa

@Calinou Calinou changed the title Metallic texture is black in shadow Metallic material is black in shadows when the material uses per-vertex shading Mar 6, 2025
@insomniacUNDERSCORElemon
Copy link

insomniacUNDERSCORElemon commented Mar 7, 2025

With one of my models I'm seeing the opposite of this issue:

Image

Not sure if there's anything I could do Blender-side to fix this.

Note that the model on the left should be gray. The white level is reduced by higher roughness, can be reduced with low specular and low metallic but in both cases it's too bright if they have non-0 values (though metallic is much more important here, will still be too bright with 0 specular).

For models where this isn't an issue (see model on right) I need to increase roughness (much higher than compared to per-pixel) so the specular highlight can be seen at all times (note the rotation animation track, with low roughness the highlighted face flashes in and out in per-vertex).

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

4 participants