Skip to content

Originally designed to deal with the situation that the unity vfx graph kill component makes particles disappear abruptly. Includes gradient box and gradient sphere.

License

Notifications You must be signed in to change notification settings

brainiac19/UnityVFXGraphGradientPrimitives

Repository files navigation

Unity VFX Graph Gradient Primitives

Originally designed to deal with the situation that the kill component makes particles disappear abruptly.I actually named it VFX Graph faded killbox originally, but changed it later because it could do more.

The left one uses a Kill AABox component, the right one utilizes the gradient box operator to sample alpha value from gradient and thus makes particles fade when they get close enough to the box's surface.

FadedKillbox

Maps gradient (0 ~ 1) to the distance from a particle to the primitive's surface from a specified distance to 0. If a particle is within distance to surface range (0 ~ specified distance), the closer it is to the primitive's surface, the output will be closer to gradient(1); the more distant it is to the primitive's surface(closer to the specified distance), the output will be closer to gradient(0).

If clamping is used, particles outside the primitive volume will be mapped to gradient(1).

If inverse clamping is used, particles inside the primitive volume will be mapped to gradient(0).

Clamping

About

Originally designed to deal with the situation that the unity vfx graph kill component makes particles disappear abruptly. Includes gradient box and gradient sphere.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published