I'm currently using a circular texture to display particles:
The circle texture contains transparent pixels. I'm leveraging ShaderMaterial
and BufferGeometry
to assign custom sizes and colors to each node. However, I'm encountering issues with the proper z-index rendering. In the provided image below:
The white particle appears to be the closest to the camera, followed by the cyan particle (0x00ffff
) and the hibiscus-colored particle in the top right corner (0xC3206F
has a pinkish hue) being the farthest away.
As demonstrated, the layering order is not as expected. Ideally, the white circle should completely overlap the cyan circle and partially cover the hibiscus one. When I enable depthTest: true
for the ShaderMaterial
, the transparent areas of the texture become opaque:
For the complete source code, you can refer to this link: http://jsbin.com/mikimifipi/edit?js,output
I suspect that I may have overlooked something related to blending or encountered issues with the shaders. Any assistance you could provide would be greatly appreciated.