Render right material

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

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


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.