Alpha over live ignored when using shader graph vfx asset

7583074--939994--ezgif.com-gif-maker.gif
I’m trying to create fake volumetric fog, but looks like the “add (or set) alpha over life” node is not working with shader graph asset: new particles is created with 100% alpha and destroyed same without smooth. It’s possible to fix this on the VFX Graph part? Or I have to fix this on the Shader Graph side (by collect sine wave to alpha chennel or something similar)?

I’m having the same issue and can’t find answers online…

Have you ever found a solution ?

Hi @syjgin and @Nagasadri ,

When you use a Shader Graph in a VFX Output, it overrides the default output shader with the custom one you supply. As such, you have to set your own logic for anything which was before done by the VFX Output shader, including things like alpha over time, flipbooks, soft particles, etc.

For the alpha specifically, you just need to expose a value in Shader Graph which is plugged in to the Alpha value of your new shader, and then in the VFX Graph you can feed it a value like age over lifetime:

You can also use curves if you want a specific value at a specific part of the lifetime, akin to the Set Alpha over Lifetime block:

Hope this helps!

7 Likes

Thank you so much !
I shrank the particles over life in the meantime, and the client liked it better that way in the end, but this will surely spare me future headaches.

1 Like

For some reason people quite often struggle to pass alpha or other data to custom shaders.
I think it would be worth to include such example like yours above in docs or in “how to do…” page.
(By the way, is there any ETA for “how to” page?)