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
While there are quite a few render_modes that relate to transparency, such as depth_draw_opaque, depth_draw_always, depth_draw_never, depth_draw_alpha_prepass, the transparency status is true if and only if the ALPHA value referenced in the fragment. It took me quite a while to work this out. It would be good to state this fact when transparency is first mentioned in the document so it is not such a mystery.
My example had a lot of surfaces popping in front and behind when I changed the direction of my view as the transparent objects were rendered in different orders. This should not have happened as all my objects were planar and parallel, so I suspect the sorting is by object centre point rather any AABB range.
I think there is a good argument for a tutorial as detailed as the spatial material tutorial to walk us through all the modes and glitches that we are likely to encounter with transparent materials, and tricks to avoid them. https://docs.godotengine.org/en/stable/tutorials/3d/spatial_material.html
Your Godot version:
3.2.3-stable
Issue description:
I was getting all kinds of glitches when I added an ALPHA field to my shader but only set it to not equal to 1.0 on rare occasions.
I spent quite a while going back and forth converting Spatial shaders into Shader Materials to find out if it was being controlled by a render_mode setting.
https://docs.godotengine.org/en/stable/tutorials/shading/shading_reference/spatial_shader.html#render-modes
While there are quite a few render_modes that relate to transparency, such as
depth_draw_opaque
,depth_draw_always
,depth_draw_never
,depth_draw_alpha_prepass
, the transparency status is true if and only if the ALPHA value referenced in the fragment. It took me quite a while to work this out. It would be good to state this fact when transparency is first mentioned in the document so it is not such a mystery.My example had a lot of surfaces popping in front and behind when I changed the direction of my view as the transparent objects were rendered in different orders. This should not have happened as all my objects were planar and parallel, so I suspect the sorting is by object centre point rather any AABB range.
The only guidance in the docs is to use transparency sparingly: https://docs.godotengine.org/en/stable/tutorials/optimization/optimizing_3d_performance.html#transparent-objects
I think there is a good argument for a tutorial as detailed as the spatial material tutorial to walk us through all the modes and glitches that we are likely to encounter with transparent materials, and tricks to avoid them.
https://docs.godotengine.org/en/stable/tutorials/3d/spatial_material.html
URL to the documentation page (if already existing):
https://docs.godotengine.org/en/stable/tutorials/shading/shading_reference/spatial_shader.html?highlight=depth_draw_alpha_prepass#render-modes
The text was updated successfully, but these errors were encountered: