Jump to content

SPS with alpha channel


Recommended Posts

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:



Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...