Closed
Description
Tested versions
- Reproducible in v4.5.beta1.official [46c495c]
System information
Godot v4.5.beta1 - Linux Mint 21.1 (Vera) on X11 - X11 display driver, Multi-window, 2 monitors - OpenGL 3 (Compatibility) - NVIDIA GeForce GTX 1070 (nvidia; 535.230.02) - Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz (4 threads) - 31.30 GiB memory
Issue description
The new 4.5 stencil option for materials allows x-ray functionality. If you convert a material with this behavior to a ShaderMaterial
, the generated gdshader will not have the same behavior.
Steps to reproduce
- Create a new
MeshInstance3D
and assign aStandardMaterial3D
to it. - Change the
Stencil > Mode
toX-Ray
. - Right click on the Material and select
Convert to ShaderMaterial
. - The X-Ray effect no longer works.
Minimal reproduction project (MRP)
The example scene depicts two otherwise identical sphere meshes, both created with StandardMaterial3D
materials with X-Ray stencils. One of the materials was converted to a ShaderMaterial
but is otherwise unchanged.