Render right material

opacityTexture go wrong display
Behind box is overlap front box. How to config to display right. Thank you
Capture

you can try playing with the needDepthPrePass of your materials, or also alphaIndex of your meshes.

1 Like

A good read: transparency_and_how_meshes_are_rendered

2 Likes

thank you. my ideal want to build voxels style game. All voxel (blocks) i will merge to one mesh and I can make one block with special texture using uvs array. But just one material for one mesh. How to make block opacity? I using opacityTexture like above, but that look overlap.

https://www.babylonjs-playground.com/#5S6MD#80