# VFX Graph
The **Visual Effect Graph** is Unity's GPU particle system: simulation runs in compute shaders, so you can push hundreds of thousands of particles, sample meshes/textures/SDFs, and chain systems on the GPU. This series is the companion to [[Particle Systems and Layered Effects]] (the CPU "Shuriken" system) - read [[5.VFX Graph Comparison and Performance]] there first if you're deciding which to use.
**Target:** Unity **6000.5+** with **URP**. VFX Graph is a **core package** bundled with the editor; the 6000.5 docs are published as **Visual Effect Graph 17.5.0**. For Quest builds, VR work in this vault targets **Unity 6.3 LTS (6000.3.27f2+)** ([[0.Choosing a Unity Version]]) - read part 6 before using VFX Graph on Quest.
> [!warning] Code not compiled
> None of the C# in this series has been compiled or play-tested in Unity. APIs were checked against the 6000.5 Scripting Reference and the VFX Graph 17.5 manual on 2026-11-10. Expect to fix small things.
> [!note] Verification status
> **Verified (2026-11-10):** VFX Graph is listed as a core package for 6000.5; its docs title reads 17.5.0. Requirements page (17.5): compute shaders (`SystemInfo.supportsComputeShaders`), SSBO support (`SystemInfo.maxComputeBufferInputsVertex > 0`), **no OpenGL ES**, URP support "isn't out of preview" (only some URP platforms), no gamma color space in URP. `VisualEffect` members (`SendEvent`, `CreateVFXEventAttribute`, `Set*`/`Has*`, `SetGraphicsBuffer`, `HasAnySystemAwake`, `aliveParticleCount`, `culled`, `playRate`, `Reinit`, `Simulate`, `outputEventReceived`), `VFXEventAttribute`, `VFXBinderBase` + `[VFXBinder]`, `VFXOutputEventAbstractHandler`, `[VFXType(VFXTypeAttribute.Usage.GraphicsBuffer)]`. Event payloads are copied at send time; `aliveParticleCount` is updated asynchronously about once a second.
> **Not verified:** the changelog page for 17.5 has no 17.5-specific entry (it says the version increased with related graphics packages), so there is no list of 6.5 VFX changes to cite. Official Quest 2 support level for VFX Graph on URP is not stated anywhere I could find beyond the general "mobile compute-capable devices, preview" wording.
## Parts
| # | Note | Covers |
|---|---|---|
| 1 | [[1. VFX Graph Setup and Mental Model]] | Install, contexts (Spawn/Initialize/Update/Output), attributes, capacity, bounds, blackboard, capability gate script |
| 2 | [[2. VFX Exposed Properties Events and Binders]] | `ExposedProperty`, Set* calls, events with payloads, custom Property Binder |
| 3 | [[3. Worked Effect - Impact Sparks with One Graph]] | Level Up! feedback/juice: one VisualEffect serves every hit; pooled instances for attached effects (Object Pool) |
| 4 | [[4. VFX GPU Events and Output Events]] | Trigger Event on Die/Collide -> child systems; Output Events -> camera shake and audio in C# |
| 5 | [[5. VFX GraphicsBuffers and Audio-Reactive Effects]] | Structured `GraphicsBuffer` -> Sample Graphics Buffer; audio spectrum and swarm positions drive particles |
| 6 | [[6. VFX Graph Performance and Quest]] | Capacity, bounds, culling, overdraw, sorting, LOD by distance, Quest Vulkan and compute caveats |
| 7 | [[7. VFX Graph Pitfalls]] | What breaks first |
## Design lens (Level Up!)
[[Level Up! (Review)]] keeps coming back to **feedback**: hits must *feel* like hits (Level 10 combat), hazards must **telegraph** before they fire (Level 12 mechanics), and landmarks pull the player forward (Level 9). VFX is the cheapest way to deliver all three. Part 3 builds hit sparks whose size and color encode damage and type; part 4 couples the same effect to camera shake and sound so one event fires all three feedback channels; the landmark beacon from [[4. Level Design with Terrain - Landmarks and Sightlines]] is a natural VFX Graph showcase (a tall column of particles visible across the map).
## Patterns used (Game Programming Patterns)
- **Object Pool** - pooled `VisualEffect` instances for effects that must follow a target (part 3). Unity's `UnityEngine.Pool.ObjectPool<T>` implements it.
- **Flyweight** - one graph asset, many instances; even better, *one instance, many events* (part 3).
- **Event Queue** - `SendEvent` queues commands that the component processes in its next update after `LateUpdate` (part 2).
- **Observer** - output events notify C# listeners without the graph knowing who listens (part 4).
- **Data Locality** - GraphicsBuffers move tight arrays of structs to the GPU in one copy (part 5).
See [[Game Programming Patterns (Review)]].
## Related (existing)
- [[Particle Systems and Layered Effects]] and [[5.VFX Graph Comparison and Performance]] - when to stay on Shuriken
- [[2.Worked Effect - Trash Can Fire]] and [[3.Particles Spawning Particles on Contact]] - the CPU versions of layering and sub-emitters
- [[URP Shaders and Shader Graph]] - Shader Graph outputs for VFX Graph
- [[HDRP Essentials]] - VFX Graph is fully supported on HDRP platforms
- [[4.Impulse Noise and Extensions]] - Cinemachine Impulse for the camera shake in part 4
- [[2. Pooled AudioSource Service]] - the audio side of impact feedback
- [[Music Visualization]] and [[Eurorack and Unity]] - audio-reactive visuals; part 5 is the GPU version
- [[5.Quest 2 Performance and Rendering]] - frame budget on Quest
- [[DOTS]] - feed ECS swarm positions into a GraphicsBuffer (part 5)
- [[Terrain]] - surface-dependent impacts; landmark beacons
## Sources
- VFX Graph 17.5 manual: https://docs.unity3d.com/Packages/
[email protected]/manual/index.html
- Requirements and compatibility (17.5): https://docs.unity3d.com/Packages/
[email protected]/manual/System-Requirements.html
- Core packages list, 6000.5: https://docs.unity.com/en-us/engine/6000.5/manual/packages-list/packages-all/pack-core
- VFX Graph changelog (17.x): https://docs.unity3d.com/Packages/
[email protected]/changelog/CHANGELOG.html
- `VisualEffect` API (6000.5): https://docs.unity3d.com/6000.5/Documentation/ScriptReference/VFX.VisualEffect.html
- `VFXEventAttribute` API: https://docs.unity3d.com/6000.5/Documentation/ScriptReference/VFX.VFXEventAttribute.html
- Component API guide: https://docs.unity3d.com/Packages/
[email protected]/manual/ComponentAPI.html
- Events (incl. GPU Events): https://docs.unity3d.com/Packages/
[email protected]/manual/Events.html
- Property Binders: https://docs.unity3d.com/Packages/
[email protected]/manual/PropertyBinders.html
- Output Event Handlers: https://docs.unity3d.com/Packages/
[email protected]/manual/OutputEventHandlers.html
- Object Pool chapter: https://gameprogrammingpatterns.com/object-pool.html
See also (added 2026-11-10): [[Combat Feel and Hit Feedback]] and [[Boss Battles with Phases]] - `VisualEffect.SendEvent` for impact sparks and telegraphs.