Guys,im confused with alpha depth that i use transparent texture and particle

guys,im confused with alpha depth that i use transparent texture and particle

when i use some mesh has alpha texture, i can see that bug

here is playground
alphatest | Babylon.js Playground (babylonjs.com)
here is my blenderFile
alphaTest.zip (523.7 KB)

That’s because both the smoke and your mesh are transparent, so they don’t write to the depth buffer and that leads to the artifacts you can see.

In your case, alpha testing is enough and that will fix the problem because in that case you don’t need alpha blending, meaning the depth buffer will be filled correctly:

Note that in the PG I have modified the material after the scene has been loaded. You should normally be able to export a glb with the right setting for your material if you use the alphaMode=MASK value (see glTF-Sample-Models/README.md at master · KhronosGroup/glTF-Sample-Models · GitHub)

5 Likes

thank u so much, u r big man