Is needDepthPrePass work for ShaderMaterial too?

hey
i try needDepthPrePass = true;

all material is shaderMaterial

It should work, can you create a repro in the playground ?

1 Like

that not work on standardmaterial too?
when one mesh inside of the others
https://www.babylonjs-playground.com/#PJQTXN#3
https://www.babylonjs-playground.com/#PJQTXN#4 : with needDepthPrePass = true;
both is wrong result

I think you may want to use alphaIndex instead:
https://www.babylonjs-playground.com/#PJQTXN#7

Doc: Transparency and How Meshes Are Rendered - Babylon.js Documentation

1 Like

thanks

1 Like

https://www.babylonjs-playground.com/#PJQTXN#8

http://www.melyon.ir/interactiveviewer/viewer/spack/20190528_154648.ca938add_60c8_4d9c_a973_9f64efbf0476.5123625/pluginsides#121909!121913!121914!121915!121916!121918$23

1 Like