This mainly affects the editor as lines seen through a refractive material will appear black. It can also affect projects that use line drawing (e.g. when using Visible Collision Shapes or Visible Navigation).
A more minimal example where the issue may be more obvious:
The refractive material is the box in the middle.
In 3.x, lines don't appear at all behind refractive materials, regardless of whether GLES3 or GLES2 is used.
This appears to be related to the depth prepass: disabling it in the Project Settings while using Forward+ hides the black lines behind refractive materials.
Steps to reproduce
Create a mesh with a BaseMaterial3D attached.
Decrease albedo color's alpha to 0, decrease roughness to 0.0 and enable refraction on the BaseMaterial3D. Set refraction scale to 0.0.
Move the camera around so the origin and grid lines appear behind the refractive material.
Tested versions
System information
Godot v4.2.stable - Fedora Linux 39 (KDE Plasma) - X11 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 4090 (nvidia; 545.29.06) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)
Issue description
This mainly affects the editor as lines seen through a refractive material will appear black. It can also affect projects that use line drawing (e.g. when using Visible Collision Shapes or Visible Navigation).
A more minimal example where the issue may be more obvious:
The refractive material is the box in the middle.
In 3.x, lines don't appear at all behind refractive materials, regardless of whether GLES3 or GLES2 is used.
This appears to be related to the depth prepass: disabling it in the Project Settings while using Forward+ hides the black lines behind refractive materials.
Steps to reproduce
0
, decrease roughness to0.0
and enable refraction on the BaseMaterial3D. Set refraction scale to0.0
.Minimal reproduction project (MRP)
test_refraction.zip