Jump to content

textureMask on mesh


Recommended Posts

I'm reading tutoria and example about particles and i found the textureMask


since i'm building a SolidParticleSystem i was wondering if texture has something similar at textureMask and if would make any difference using a PNG with alpha instead an image without alpha and apply a mask on it

is it for better performance?


Link to comment
Share on other sites

from this tutorial it says



For this texture, you can use an optional mask to filter some colors, or filter a part of the alpha channel.

particleSystem.textureMask = new BABYLON.Color4(0.1, 0.8, 0.8, 1.0);


and it links at this example


but actually i can't find the textureMask part :huh:

i download the code expecting a PNG with alpha but it is white in the center and black on the side

and i can't really understand how that happens, i guess with a mask and i was wondering if is possible to do the same thing with a material apply at standard mash

I don't know if the reason not to use alpha in the image is for performance, but i guess that is the reason




Link to comment
Share on other sites

actually textureMask is only a property of the standard particle system, not of the solid particle system (sps=

You just have to remember that a SPS is simply in fact a standard mesh. So any property appliable to a mesh will work on the SPS... this means all the materials, PBR materials, easy shaders (eash), etc.

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...