You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
I've placed all spheres on the same height, adjusted decals' extents to be very tall (100 units each) and adjusted decal sizes to look visually identical:
If you reduce decals' Y extents to be short (0.5 local units each), they will end at different distances since they're being scaled by their transform:
If you reduce decals' Y extents to be short (0.5 global units each), they will end at the same distance, but you can clearly see Normal Fade acting differently:
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 aSphereMesh
MeshDecal
, 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
The text was updated successfully, but these errors were encountered: