Jump to content

Custom Particle shader


Recommended Posts

I've been digging through Babylon.js lately and for the project I'm working on I'd like to be able to write a custom GLSL shader for my particle systems (for things like lit particles, soft particles, etc). I can't tell if this is something that's possible or not, I haven't been able to find any documentation on it, other than being able to change the blend mode...

Link to comment
Share on other sites

Right now this is not directly supported but you can set particleSystem._effect to your own effect like this:

particleSystem._effect = engine.createEffect("particles",                    ["position", "color", "options"],                    ["invView", "view", "projection", "vClipPlane", "textureMask"],                    ["diffuseSampler"], "");

particles should be the name of your shader file

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