Strange Shading Artifact with Semi-Transparent Material

Hello,

When I assign a semi-transparent material (alpha = 0.5), I’m getting very strange shading results. In the playground below, I have a simple cylinder mesh (it’s a hollow shape with no faces inside), but it appears as if there is a circular face inside the object.

Could you please let me know what I’m doing wrong and how I can fix this shading artifact?

Thank you,
David

mat.needDepthPrePass = true

I added a box to better see the transparency effect - Babylon.js Playground

1 Like

“Circles” are an artifact resulting from the use of transparency with the order in which faces are rendered. @labris is one solution, and if you want the mesh to be fully transparent, you can also use OIT:

See Transparent Rendering for more information about transparent rendering.

2 Likes

thank you for both solutions works great for me

1 Like