Godot version
v4.0.dev.20211210.official [21b8199]
System information
Windows 7, Vulkan Clustered, RX 570 (21.5.1)
Issue description
When a mesh is scaled either with its own Scale transform or the Scale of any parent nodes, the Normal Fade feature of Decals applied to it will misbehave.
The Decal's normal fading appears inconsistent and buggy.
When the mesh node's scale is even (all fields have the same value), there is a visible pattern: When the mesh is scaled up, the Decal appears too opaque. And vice versa for meshes that are scaled down, the Decal appears too transparent. Otherwise, there isn't any pattern I can discern.
The Decal's place in the scene tree does not matter, including its own scale.

Three unshaded SphereMeshes, identical aside from their Scale. All of these Decals have their Normal Fade set to 0.5. Their Vertical Fade was also lowered to 0, to not interfere with the test.
I expect that all the Decals appear just like the middle one, fading the exact same amount based on the normal.
Steps to reproduce
- Create a
MeshInstance3D, preferably with a SphereMesh Mesh
- Create a
Decal, give it any Albedo texture. Set the Normal Fade to a value above 0. I also recommend setting both Vertical Fade properties to 0, so that they do not cause confusion.
- Move the Decal so that it's applied to the mesh. Make it a child of the mesh node so that it's in the same position on the mesh, and covers the same area on it.
- Scale the mesh node. Observe the decal's transparency changing. Drag the Decal's Normal Fade property around, to clearly see how it's been affected.
Minimal reproduction project
DecalFadeTest.zip
Godot version
v4.0.dev.20211210.official [21b8199]
System information
Windows 7, Vulkan Clustered, RX 570 (21.5.1)
Issue description
When a mesh is scaled either with its own Scale transform or the Scale of any parent nodes, the Normal Fade feature of Decals applied to it will misbehave.
The Decal's normal fading appears inconsistent and buggy.
When the mesh node's scale is even (all fields have the same value), there is a visible pattern: When the mesh is scaled up, the Decal appears too opaque. And vice versa for meshes that are scaled down, the Decal appears too transparent. Otherwise, there isn't any pattern I can discern.
The Decal's place in the scene tree does not matter, including its own scale.
Three unshaded SphereMeshes, identical aside from their Scale. All of these Decals have their Normal Fade set to
0.5. Their Vertical Fade was also lowered to 0, to not interfere with the test.I expect that all the Decals appear just like the middle one, fading the exact same amount based on the normal.
Steps to reproduce
MeshInstance3D, preferably with aSphereMeshMeshDecal, give it any Albedo texture. Set the Normal Fade to a value above 0. I also recommend setting both Vertical Fade properties to 0, so that they do not cause confusion.Minimal reproduction project
DecalFadeTest.zip