Skip to content

An example Unity project for Visual Effects Graph, including custom HLSL nodes, UI effects, point caches and SDFs.

Notifications You must be signed in to change notification settings

UlasTosun/Unity-VFX-Graph-Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity VFX Graph Examples

According to the documentation the Visual Effect Graph enables you to author visual effects using Node-based visual logic. This repository provides examples for some specific cases in VFX Graph such as Point Caches, SDFs and VFX on UI.

Examples Cases

GPU Events: This case provides an example to show how to spawn particles based on other particles by using GPU Events. It creates a basic firework VFX. Fireworks with GPU Events

Flip Book on UI: Basics of flip book playback and how to play them on the UI. Flip Book on UI

Point Cache: This case includes basics of Point Caches in VFX Graph. Also, it includes a C# script to control VFX Graphs and set their properties via C# API.

Point Cache on UI: This case provides an example to show how to play VFXs on UI by using a custom Sprite Unlit Shader Graph for UI. Point Cache on UI

Signed Distance Field (SDF): Basics of SDFs and how to use them in VFX Graphs. Also, it uses VFX Property Binder Component to set VFX properties at runtime without using C# API. Signed Distance Field

Custom HLSL Nodes: This case demonstrates how to inject custom HLSL codes to VFX Graph Blocks and Operators.It breaks the limitations of the built-in nodes and gives more flexibility and control on the graph.

VFX Graph vs. Particle System

In terms of creativity and product quality VFX Graph is a better option, because it allows the ability of creating more complex visual effects. Graph based creation process is easier to use, especially for complex effects.

On the other hand, in terms of performance, this versus is complicated. Both render particles on GPU, obviously. However, for simulating particles (calculating particle positions, velocities, sizes, etc.) they use different hardware, Particle System uses CPU and VFX Graph uses GPU via compute shaders. So, if you have enough GPU power, using VFX Graph is a better option, because GPU can simulate more particles. However, if you are already bounded by the GPU, then Particle System might be a better option, because it needs less GPU power.

About

An example Unity project for Visual Effects Graph, including custom HLSL nodes, UI effects, point caches and SDFs.

Topics

Resources

Stars

Watchers

Forks