juanmajr93 Posted January 24, 2017 Share Posted January 24, 2017 Hi all, @jerome I have done a SPS whose some particles have a little transparency and others not. However, I have a problem with particles that I dont want to apply alpha because now they are not solid cube!!. When I enable alpha chanel: #spsArquetas.mesh.hasVertexAlpha = true; for the solid particle I get this result: The result that I want to get is the follow: Thanks! Quote Link to comment Share on other sites More sharing options...
jerome Posted January 24, 2017 Share Posted January 24, 2017 That's what I explained to you in the PM: once you enabled the alpha channel, even if the value is 1.0, the vertices aren't z-sorted for performance reasons. The sort is done only at the mesh level. That's why you can sometimes see such weird shapes inside-out. This tutorial is a must-read to understand this : http://doc.babylonjs.com/tutorials/Transparency_and_How_Meshes_Are_Rendered As the SPS s a single mesh, if you enable particle transparency, you have to accept that this can happen. If you don't want it, you need then to manage two SPS, one with transparent particles, the other with opaque ones. Quote Link to comment Share on other sites More sharing options...
juanmajr93 Posted January 24, 2017 Author Share Posted January 24, 2017 @jerome ok so I will need to use 2 Sps if there isnt any way to repair this bug. However, performance of my scene is very important and I always try to render the less number of meshes that is posible. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.