Problem Description
The Material.OpaquePrePassDepthDraw option, which is required for the correct rendering of opaque objects with an alpha mask, is not working in the following case:
- Environment:
-
- OS: Windows 11
-
- API: Vulkan or OpenGL
-
- GPU: NVIDIA
- Configuration:
-
- Using instancing.
-
- Using CustomMaterial.
Reproduction Steps
When using instancing with a CustomMaterial and the Material.OpaquePrePassDepthDraw option enabled, graphical artifacts appear. I have attached a minimal reproducible example to demonstrate the issue and facilitate its analysis.
Example available here : https://drive.google.com/file/d/1iX-VRyNaT_QWwu1iSNfx2LnBIDJ0IfH_/view?usp=sharing
Impact
This bug is a critical blocker for our work, as it prevents the scene from being rendered correctly on most user systems (Windows with NVIDIA graphics cards). We cannot stop using CustomMaterial, instancing, or the Material.OpaquePrePassDepthDraw option, as all of these are essential elements for the final scene.
Request
I kindly request that you fix this bug or provide a temporary solution.