Description
Tested versions
4.0.4, 4.2, 3.5
System information
macOS 14.4 (23E214) Godot 4.2, 4.0.4
Issue description
Setting ALPHA=1.0 in the shader script still has a transparent effect, just like setting the transparency of StandardMaterial3D to alpha or setting no depth test.
But if the rendering mode of the shadow script adds depth_draw-always, setting ALPHA=1.0 can display normally, but it cannot produce shadow effects.
Steps to reproduce
In the project I uploaded:
In the scene of node_3d_desk, the shader script has set ALPHA=1.0 and I do not want to see the tripod of the table.
Desk_normal has added StandardMaterial3D to the surfaceMaterialOverlay of Box024 without any changes.
Desk_alpha added StandardMaterial3D to the SurfaceMaterialOverrides of Box024 and changed transparency to alpha.
Desk_no_depth_test has been added to StandardMaterial3D and transparency has been changed to no_depth_test in the surface MaterialOverrides of Box 024.
Desk_shaded_alpha added ShaderMaterial in the surfaceMaterialOverride of Box024, with only ALPHA=1.0 set in the script.
In the scene of node_3d_sofa, there is also a similar problem. This problem occurs whenever the mesh has an irregular shape.
How can I set ALPHA=1.0 in the shader without expecting transparency or no_depth_test effects, and still display shadows normally.
When I add render_mode depth_draw_always in the shader script, it can display normally, but it cannot display shadows properly. If the following image is displayed:
Shadow display in normal mode:
Display shadows after setting ALPHA=1.0 and adding render_mode depth_draw_always: