Procedural VFX Toolkit

Procedural VFX Toolkit is a Unity asset that produces input-driven and standalone visual effects. Every effect is built from a shader, a sprite, or a piece of text, and a prefab is the delivery unit: add an effect prefab to the scene and it plays. The same prefab drives a trail that follows a finger, a one-touch burst on a tap, or a standalone effect spawned from code, on a UI Canvas or in world coordinates. The asset ships with three input-driven player components, two standalone players, a unified input layer, a 50+ shader library, an editor wizard that builds ready-to-use prefabs from any of the shaders, and an AI prompt file for generating new effects.

Overview

What it is

Procedural VFX Toolkit is a single system for visual feedback in Unity. It wraps three effect technologies under one input pipeline and one playback model: procedural shader effects computed on the GPU, pooled sprite particles, and pooled TextMeshPro text objects. Each of the three keeps its own visual identity; all three share the same configuration shape, the same input handling and the same pooling infrastructure.

The asset is built around prefabs. A prefab carries a player component and a material in its Glow Material slot. Dropping the prefab onto a Canvas makes the effect react to touch and mouse; dropping it into the scene plays it in world space; instantiating it from code plays it once on demand. Swapping the material swaps the visual: the player component does not care which shader it is playing.

What it does

The toolkit turns finger and mouse motion into smooth, customizable trails, turns a single tap into a one-touch burst, and spawns shader, sprite and text effects on a Canvas or in world coordinates regardless of input. Six families of behavior are exposed through prefabs and components:

  • Input-driven shader trails and bursts via TouchGlowUI: a RawImage-based trail where each point is a pooled RawImage with its own material instance and the shader paints the trail on top.
  • Input-driven sprite bursts via SparkleSpawner: pooled 2D particles with a texture, a color, a size, an angle and one of eight dispersion patterns.
  • Input-driven text popups via TouchTextUI: pooled TextMeshPro objects with one of ten movement animations and one of three disappearing animations.
  • Standalone UI playback via ParticlePreviewPlayer: a RawImage with a shader material, optionally combined with a sprite subsystem, played on a Canvas.
  • Standalone world playback via GlowMeshPlayer: a Quad with a MeshRenderer sampling a RenderTexture that the shader writes into.
  • World-space spawns via VfxController: a convenience wrapper that instantiates a world effect at a position and optionally auto-destroys it.

Why procedural

A shader effect is an animated shader applied to a flat image or mesh with a transparent background. From the player’s viewpoint it reads as volumetric, so a single quad replaces a VFX prefab made of dozens of particle objects. The math runs on the GPU; the CPU only writes a time value and a random seed into the material. The result is a lightweight, customizable effect that scales across a wide range of platforms and stays under 0.1 ms of CPU time per frame for active trails.

Typical use cases

  • Persistent UI feedback for input. Add an effect prefab from TouchEffects to a Canvas. Every tap and swipe produces feedback.
  • UI effect once or in a loop. Create a reference to a TouchEffects > PreviewEffect prefab and spawn it on the Canvas via Instantiate.
  • 3D effect once or in a loop. Create a reference to a WorldEffects prefab (URP or Built-in variant) and spawn it at the required world position.
  • Replace heavy mobile VFX. Swap particle-based world effects (hits, explosions, auras, orbs, domes) for lightweight, performant shaders.
  • Guide attention in tutorials. Use looping effects to highlight UI elements, tutorial targets and rewards without blocking interaction.
  • Add a distinctive style. Heat trails, slash marks, shattered glass, fingerprints, neon glows, comic impacts, healing auras.
  • Draw over UI. A trail that follows a finger, paints on top of the Canvas and fades in place.
  • Reward feedback in games. Damage numbers, reward labels, level-up bursts, spell effects.

What ships in the box

  • 50+ production-ready shaders in the UniversalProceduralVfx/ shader family.
  • Three input-driven players: TouchGlowUI (shader trails), SparkleSpawner (sprite bursts), TouchTextUI (text popups).
  • Two standalone players: ParticlePreviewPlayer (UI) and GlowMeshPlayer (world).
  • A unified InputController with touch, mouse, multi-touch, conditional playback and a small sound system.
  • A VfxController for spawning world effects from code.
  • A ContinuousRotation utility and a ReadOnly attribute with its property drawer.
  • An editor wizard for creating effect prefabs from any shader in the family, with pipeline-aware display material setup.
  • Custom inspectors with Play, Stop, Refresh buttons and a display-material health check.
  • The particle-shader-prompt.md file: structural rules, nine sample shader sources, and an AI workflow for generating new effects.
  • Full documentation on GitBook, YouTube tutorials and demos, and a Unity Forum discussion topic.

Key features

Unified effect structure

Every effect is built on the same shader material layout, so a single prefab can drive an input-attached trail and a standalone spawn. Attaching the prefab to input makes the effect follow a finger or respond to a tap; instantiating the prefab from code makes it fire as combat VFX at a chosen position. The player component does not distinguish between the two: the material in the Glow Material slot is what defines the visual.

50+ production-ready shaders

Glows, blurs, geometric shapes, comic impacts, auras, explosions, sparks, force fields, shockwaves, healing effects. Each shader is a template: copy it, adjust its parameters on the material, or use the AI prompt file to generate a new one that follows the same structure. The full shader family is prefixed UniversalProceduralVfx/ and lives in a single folder.

Seed-based randomization

Every effect carries a per-cycle _RandomSeed written into the material at the start of each cycle. The same shader produces a different layout on every spawn, with no extra assets. Randomization is optional: pin the seed to a fixed value for a deterministic, repeatable look that is stable across sessions.

Three rendering modes

  • Shader-based. Procedural, GPU-only, no textures. The main mode and the one the shader library targets. Drives UI trails, world quads, auras, impacts.
  • Sprite-based. Textured 2D particles with object pooling. Used for glitter, sparkles and small accent particles that complement a shader trail.
  • TextMeshPro-based. Floating text popups with a movement pattern and a fade animation. Used for damage numbers, reward labels, tutorial hints.

A single component (ParticlePreviewPlayer) can run the shader system and the sprite system simultaneously, with synchronized lifetime and playback speed, so a UI effect can combine a shader glow with sprite glitter in one prefab.

Two input interaction modes

  • OneTouch. A single tap produces a single burst. Used for feedback on buttons, taps and point interactions. In TouchGlowUI, OneTouch produces a persistent particle per finger that follows the touch and fades on release.
  • Trail. Continuous movement produces a continuous trail. Used for drawing, signatures, sword swings, slice marks. A spacing threshold controls point density independently of framerate.
  • Both modes support multi-touch. Advanced trail controls include sharp-edge tapering (start and end), multi-touch tracking, and manual or event-driven invocation.

Input flexibility

The InputController reads the Old and the New Unity Input System through a single API, so a project can swap between them without touching the players. Playback can be filtered to a specific object, a Tag list, a Layer list, or no restriction, and to an object type (UI, 3D, 2D, any). This lets a project play a sparkle and a sound on a specific button while ignoring the rest of the UI.

Universal pipeline support

Built-in Render Pipeline, Universal Render Pipeline and High Definition Render Pipeline are all supported through the shader architecture. Every Canvas render mode is supported as well: Screen Space Overlay, Screen Space Camera and World Space. Detection is automatic — the player components check the active pipeline at startup and adjust their display material and texture property.

PC and mobile optimization

Automatic input detection, sub-millisecond execution times, minimal FPS impact. Trail update execution is typically under 0.1 ms per frame during active touch interactions. Two per-effect performance knobs (resolution and blit rate) let the project scale an effect down on low-end hardware without changing its structure. Sprite and text systems pool their GameObjects and cache their components so the per-frame update loop does not allocate.

Pooling and lifetime management

RenderTextures and Materials are rented and returned from static pools instead of being created and destroyed per spawn. On mobile this matters: creating and releasing a 512×512 RenderTexture per spawn fragments the GPU driver’s internal heap, and the freed memory is not returned to the operating system even after Destroy. Pooling bounds the total to the peak concurrent count, which never grows across a session. Sprite and text players pool their GameObjects in the same spirit.

Sound design

The InputController carries a small audio system. A configurable number of AudioSource instances is created on the same GameObject at startup. Three clip lists feed it: one for tap feedback, one for trail start events, one for trail end events. Each call selects a random clip from the active list, plays it on the first free source, applies a configurable default volume and an optional random stereo pan for left/right ear variation on mobile.

Editor tooling

  • Effect prefab wizard. Menu entry Assets > Create > Procedural VFX Toolkit > Effect Prefab... builds a ready-to-use prefab and its effect material from any shader in the family.
  • Play Mode inspector controls. Every player has Play, Stop and Refresh buttons, plus a status label, drawn in the Inspector during Play Mode.
  • Display material health check. GlowMeshPlayer verifies the target renderer’s shader and texture property against the active pipeline and offers a one-click Fix.
  • ReadOnly fields. Fields that must not be edited in the Inspector (baked lifetime, auto-resolved renderers, shader-handled properties) are marked read-only.
  • Scene gizmos. SparkleSpawner and TouchTextUI draw spawn areas and animation trajectories in the Scene View.

AI-assisted shader generation

The toolkit ships a particle-shader-prompt.md file that documents the shader structure, lists nine sample shaders with full HLSL source, and gives an AI model the rules it needs to produce a new effect in the same family. The workflow is iterative: send the file, describe the visual, receive a base version that follows the technical specification exactly, then refine.

How it works

Shader-based effects

A procedural shader runs into a square RenderTexture. The texture is bound to a mesh or a UI image, and the mesh is drawn in the scene or on the Canvas. Every frame the player writes a fresh _TimeNow into the material, the shader computes the visual for that moment, and the texture is sampled on the target. Because the shader is fully procedural, no input textures or meshes inside the effect are needed.

For world effects, the blit happens inside a camera callback (Camera.onPreRender for Built-in, RenderPipelineManager.beginCameraRendering for URP and HDRP). This guarantees the blit is committed to the GPU before the camera draws the mesh that samples it, which eliminates the intermittent “one frame correct, next frame wrong” glitch that a LateUpdate-only path can produce. For UI effects, no blit is used: the RawImage samples the shader material directly.

Sprite-based effects

Sprite effects are pooled 2D particles. A burst of N particles is spawned at the touch point, each with a random texture, color, size, angle and movement pattern. Over its lifetime each particle interpolates from a start position to a target (or along a directional vector), scales down, fades out, and returns to the pool. Eight dispersion patterns and three fade animations cover most of the visual space a small accent effect needs.

Text-based effects

Text effects are pooled TextMeshPro objects. Each spawn picks a random string from a configured list and a random color from a configured list, then applies a movement animation. Ten appearance animations and three disappearing animations are supported. Font, style, size range and movement range are configured per instance, and the pool size is bounded so a busy UI does not accumulate thousands of text objects.

Playback model

Every player runs the same cycle. A cycle starts at a timestamp, advances through a normalized age in [0, 1), and ends either by looping (pause, then start again) or by stopping (one-shot, optionally destroy). The lifetime is baked into the material at startup, so the effect cannot desynchronize from the shader’s own clock.

For one-shot effects with destroyOnEnd, the player queues a final blit and lets the camera callback perform it before destroying the GameObject. This avoids the edge case where the effect would be destroyed without ever showing its last frame.

Pipeline detection

GlowMeshPlayer detects the active pipeline by checking GraphicsSettings.currentRenderPipeline. Built-in uses _MainTex and an Unlit/Transparent display material. URP uses _BaseMap and a Universal Render Pipeline/Unlit display material. HDRP reuses the Built-in display path, which works without additional setup. Switching pipelines in an open project triggers a one-click Fix in the GlowMeshPlayer inspector when the display material was not updated.

Resource pooling

RenderTextures and Materials are rented from static pools. The pool key is the size for textures and the source-material InstanceID for materials. On return, RenderTextures are cleared and stacked; materials keep their last properties until the next rent refreshes them from the source. When a pool overflows, the excess instance is destroyed instead of growing the pool. A session-scoped cleanup service calls Resources.UnloadUnusedAssets() every 15 seconds so Unity’s internal unused-assets list does not grow with every destroyed asset. Pooled instances stay C#-alive and are not touched by the unload.

Design highlights

Beyond the feature list, three engineering decisions make the system reliable in production: one for cross-pipeline universality, one for render ordering, one for memory footprint and context reuse. Each solves a class of problem that a project would otherwise have to solve by hand.

One effect, any render pipeline

The toolkit is not tied to URP or to Built-in. Three components cooperate so every effect works on every pipeline without manual rework:

  • Runtime auto-detection. GlowMeshPlayer reads GraphicsSettings.currentRenderPipeline at startup and binds the RenderTexture to the correct texture property: _BaseMap on URP, _MainTex on Built-in and HDRP. The display material and the texture property are chosen from the same source of truth, so the effect is visible on the first frame on every pipeline.
  • Authoring-time repair. The prefab wizard resolves the display material for the active pipeline before building a prefab. A pre-authored material ships for each pipeline (URPMat_UnlitTransparent, TemplateMat_UnlitTransparent); when the file is missing, a fallback is created on the fly. In both cases the shader reference is verified and repaired in place, and the URP transparency settings are enforced, so a prefab created on URP is not broken on Built-in and vice versa.
  • Inspection-time fix. The GlowMeshPlayer inspector compares the target renderer’s shader and texture property against the active pipeline and shows a one-click Fix when they do not match. A project that switches pipelines can recover every GlowMeshPlayer prefab at once, without re-importing or re-creating the prefabs.

The effect material itself is pipeline-agnostic: the shader, the properties and the material instance are the same on every pipeline. Only the display shim changes. As a result the same .mat and the same .prefab survive a pipeline switch, a project migration, or a build on a different target.

Render ordering that survives every driver

The world blit does not happen in LateUpdate. It happens inside a camera callback: Camera.onPreRender on Built-in, RenderPipelineManager.beginCameraRendering on URP and HDRP. The callback fires immediately before the camera draws the mesh that samples the RenderTexture, so the blit is guaranteed to be committed to the GPU before the mesh is drawn. The classic “one frame correct, next frame wrong” glitch that a LateUpdate-only path can produce (when the project forces a render — Scene View, manual Camera.Render, SRP passes, post-processing chains) does not occur.

Two more mechanisms close the remaining edge cases:

  • Warm-up. Three blits are submitted before the renderer is enabled. The first visible frame is therefore always correct, even if the shader has not yet been compiled or the RenderTexture’s GPU memory has not been cleared. Warm-up bypasses the blit throttle, so the three blits complete within a few frames.
  • Pending final blit. When a one-shot cycle ends, the player queues the last frame and lets the camera callback perform it before destroying the GameObject. A LateUpdate fallback handles the edge case where no camera fires at all (object culled, no active camera), so the GameObject is still destroyed and the RenderTexture is still returned to the pool.

Between cycles, the player also restores the renderer’s original shared material on destroy and recreates the RenderTexture if it lost its GPU allocation on re-enable. The effect does not glitch on spawn, does not flash garbage on the first frame, does not show a stale frame in the editor’s Scene View, does not lose its final frame before destroy, and does not leave a dangling material on the renderer.

An effect is a shader, not an asset bundle

A shader effect is a single .shader file: no textures, no meshes, no baked material data. The visual is computed procedurally on the GPU, so the footprint of the effect is a few KB of shader source plus one Material and one RenderTexture at runtime. The same shader drives a UI trail, a UI burst, a UI one-shot and a world effect: the player component changes, the material does not, and the shader is unaware of the context.

Consequences that matter in a real project:

  • Small install size. 50+ effects in the family fit in a handful of KB of shader source, and a new effect can be added by dropping one file into the shader folder.
  • One effect, any context. A single material becomes a UI trail, a UI burst, a world hit, a world aura. No per-context rework, no duplicate assets.
  • No allocation churn. Nothing to load, nothing to instantiate, nothing to spawn. The only runtime resources are one RenderTexture (pooled, 16 per size maximum) and one Material per effect instance (pooled, 32 per source maximum), so a session that spawns thousands of effects holds at most the peak concurrent count.
  • Mobile-friendly by construction. One quad per effect, no particle stacks, no overdraw, under 0.1 ms of CPU per frame for active trails.

The system behaves like a shared library of tiny effects that any part of the game can summon at any time — not a fixed set of prefabs that only fit the context they were built for.

Input system

The InputController is one instance per scene. Every player reads from the same input source. The input controller caches input every frame into a consistent structure so every player sees the same values within a frame regardless of which one queried first.

Touch phases

Five values, mapped from both the Old and the New Input System into a unified enum:

  • Began — the touch just started this frame.
  • Moved — the touch moved significantly this frame.
  • Stationary — the touch is held in the same place.
  • Ended — the touch ended normally.
  • Canceled — the system canceled the touch.

Input system types

Old reads from UnityEngine.Input (the Legacy Input Manager). New reads from UnityEngine.InputSystem. The choice is manual, not automatic: set the field to match the project. When the New Input System package is not present in the project, the New code path is compiled out and the field has no effect.

Mouse input types

LMBOnly counts only the left mouse button as input. Both counts the left and the right mouse buttons. Touch input is read the same way in both modes.

Operation modes

Default processes input every frame and feeds every player. ManuallyCall skips the automatic polling: input is only exposed after an explicit ForceUpdateInputData() call, which lets a tutorial script or an EventTrigger fire the effect at exactly the right moment.

Interaction targets

Playback can be restricted to:

  • ByGameObject — one specific GameObject.
  • ByTag — any GameObject whose tag is in the configured list.
  • ByLayer — any GameObject whose layer is in the configured list.
  • AnyTarget — no restriction.

The check also filters by object type: UI, 3D, 2D, or AnyType. UI has the highest raycast priority, 3D second, 2D last. The UI path goes through the EventSystem; 3D through Physics.Raycast; 2D through Physics2D.Raycast.

Public API

  • GetInputDown() — true on the frame input started.
  • GetInputUp() — true on the frame input ended.
  • GetInputL() — true while input is active (legacy name preserved).
  • IsInputMoving() — true while input is active.
  • GetInputPosition() — the primary input position in screen coordinates.
  • GetAllTouches() — array of TouchData for all active touches (up to 10 on the New Input System).
  • ShouldProcessInput() — gate that combines operation mode, target filters and effect-enabled state.
  • ForceUpdateInputData() — refreshes the cache on demand, used by manual mode.
  • GetManualCallInput() — true when manual-mode input was detected.
  • GetManualCallInputPos() — cached position from the last manual-mode input.
  • GetManualCallInputTime() — cached timestamp from the last manual-mode input.
  • PlaySound() — plays a random tap clip from the tap pool.
  • PlaySoundStartSwipe() — plays a trail start clip.
  • PlaySoundEndSwipe() — plays a trail end clip.

Sound design

Three pools of AudioSources are created on the same GameObject at startup, with playOnAwake and loop disabled. Each call finds the first free source, applies the default volume, and (when random stereo is on) applies a random pan between −0.5 and 0.5. Field list:

  • maxSimultaneousSounds — default 3; the size of the tap pool.
  • soundClips — clips played on tap events.
  • soundClipsSwipeStart — clips played on trail start events.
  • soundClipsSwipeEnd — clips played on trail end events.
  • defaultVolume — default 0.5.
  • randomStereo — when on, applies a small random pan for left/right variation.

Core components

Every component lives in the TouchEffectSystem namespace. The InputController is described in its own section above because every effect player reads from it. This section documents the five player components that drive effects (TouchGlowUI, SparkleSpawner, TouchTextUI, ParticlePreviewPlayer, GlowMeshPlayer) and the three supporting components that ship alongside them (VfxController, ContinuousRotation, ReadOnlyAttribute).

TouchGlowUI

Input-driven shader trails on a UI Canvas. It is the core of the input-driven side: it spawns trail points as the player moves, each point is a pooled RawImage with its own Material instance, and the shader turns the string of points into a glowing trail.

Modes. Two modes are supported. Trail spawns points along the input path and lets the shader paint a continuous trail. OneTouch spawns a single persistent particle per touch, follows the finger while held, and lets the particle fade on release. Both support multi-touch; a dedicated OneTouch multi-touch mode runs up to 10 simultaneous fingers, each with its own particle.

Sharp edges. A taper feature for the Trail mode. The first N points scale from 15% of their base size to full; the last N points scale from full down to 10%. Intermediate particles are inserted where the tapered trail gets too thin, so the visual stays continuous. Sharp edges require single-touch mode because per-touch point counting needs a stable touch ID.

Per-platform settings.

SettingDesktop defaultMobile default
Max points512512
Glow lifetime2 s2 s
Point size120 × 120 px150 × 150 px
Trail spacing10 px8 px
Target FPS6060
Start taper points6432
End taper points6432

Other settings. Size multiplier (range 0.1 to 2, applied to point size and spacing). Multi-touch toggle. dontDestroyOnLoad to persist effects across scene changes. alwaysLastSibling to keep the effect rendered above other UI children. Force-mobile-in-editor toggle for testing mobile behavior in the Editor. Debug logging toggle. Initialization delay (default 0.1 s) to prevent startup frame drops.

Material updates. The player batches shader time updates and applies them at most 30 times per second, which reduces the per-frame SetFloat calls without affecting visual smoothness for a soft trail. Each point carries its own Material instance so per-point properties (start time, random seed) do not leak into the shared source material.

Public API.

  • ShowEffect() — fires a one-touch effect at the last detected input position, intended for manual mode and for EventTrigger hooks.
  • EnableTouch() — sets inputController.effectEnabled to true.
  • DisableTouch() — sets it to false.

SparkleSpawner

Input-driven sprite bursts on a UI Canvas. The sprite complement to TouchGlowUI: a burst of small 2D particles at the touch point, each fading and scaling over a short lifetime. Uses a pre-created object pool with component caching, so the per-frame update loop does not touch GetComponent.

Modes. OneTouch and Trail. In Trail mode, points are spawned at a configurable spacing threshold as the finger or mouse moves.

Dispersion patterns. Eight values. None spawns particles in place at the target. Radial starts at the center and moves outward. RadialSymmetric distributes particles evenly around a circle by index. Down, Left, Right, Up start particles in a ring and move them in that direction. Inward starts at the outer edge and travels toward the center.

Fade animations. FadeAndScale, Fade, Scale. Rotation: None, Radial (aligned with the movement direction), Random.

Per-platform settings.

SettingDesktop defaultMobile default
Max points512512
Sparkle lifetime1 s1 s
Min point size20 px20 px
Max point size40 px40 px
Trail spacing20 px10 px
Min sparkles per burst88
Max sparkles per burst1616
Min spawn radius80 px80 px
Max spawn radius120 px120 px

Other settings. Sparkle textures array. Sparkle colors array (default white, yellow, cyan, magenta). Sparkle particle prefab with RawImage and RectTransform. Parent transform. Size multiplier (0.1 to 2). Multi-touch toggle. dontDestroyOnLoad. alwaysLastSibling. Force-mobile-in-editor toggle. Debug logging toggle. Initialization delay (default 0.1 s).

Editor gizmos. The spawn area is drawn in the Scene View: the inner and outer radii of the spawn ring, with a filled area between them. Directional patterns show a trajectory from the ring to the end position.

Public API.

  • ShowEffect() — fires a burst at the last detected input position.
  • EnableTouch() — enables input processing on the shared controller.
  • DisableTouch() — disables it.

TouchTextUI

Input-driven TextMeshPro popups on a UI Canvas. Each tap spawns a short string that moves outward and fades. Text objects are pooled and cached; when the pool is exhausted, the oldest active text is recycled.

Appearance animations. None (static). RadialRandom (random direction in a full circle). RadialArc (random direction within a 70-degree cone pointing up, from 55 to 125 degrees). Down, Left, Right, Up. ZoomIn (scale from 0 to 1). ZoomOut (scale from 1.5 to 1). Bounce (upward overshoot to 1.3× the target distance in the first 60% of the lifetime, then spring back to 1.0× in the last 40%).

Disappearing animations. FadeAndScale, Fade, Scale.

Per-platform settings.

SettingDesktop defaultMobile default
Text lifetime1 s1 s
Min font size2424
Max font size4848
Min move distance50 px50 px
Max move distance150 px150 px

Content settings. Text strings list (default ["+1", "+10", "BOOM"]). Text colors list (default white and yellow). Font asset. Font style. Sprite asset. Text prefab (created automatically when not assigned). Text parent. Text basic size delta (default 100 × 100). Alignment (default center). Size multiplier (0.1 to 2). Initialization delay (default 0.1 s). Pool size 20. alwaysLastSibling, dontDestroyOnLoad, force-mobile-in-editor, debug logging.

Editor gizmos. The spawn area is drawn in the Scene View according to the selected appearance animation: a point for None, a ring for radial patterns, an arc for RadialArc, an arrow trajectory for directional patterns, an overshoot+spring trajectory for Bounce.

Public API.

  • ShowEffect() — picks a random string from the list and spawns it at the last detected input position.
  • ShowEffectWithTexts(string text) — spawns a specific string; the original list is restored afterwards.
  • EnableTouch() / DisableTouch() — toggle input processing on the shared controller.

ParticlePreviewPlayer

Standalone UI playback on a Canvas. Give it a RawImage and a material and it plays a shader effect in place; add sprite textures and a particle prefab and it runs a sprite system alongside the shader. This is the component inside every PreviewEffect prefab. Both systems share one playback clock and advance together.

Playback settings. Particle lifetime (0.5 to 5 s, default 2). Playback speed (0.1 to 3, default 1). Pause between cycles (0.1 to 2 s, default 0.5). Loop. Destroy on end (only meaningful when loop is off). Target frame rate.

Shader system settings. Glow material. Shader particle size (default 120 × 120, read-only after start). RawImage reference is auto-resolved from the same GameObject or a child.

Sprite system settings. Sprite textures array. Sprite colors array. Sprite particle prefab. Sprite parent. Dispersion type (eight values). Rotation type (None, Radial, Random). Pool size (0 to 24, default 12). Min spawn radius (default 40). Max spawn radius (default 80). Base sprite size (default 30).

Frame rate. Four values. FPS_24, FPS_30, FPS_60, Unlimited. The shader still renders every frame on the RawImage; the throttle only limits how often a fresh _TimeNow is written. GPU cost is unchanged, CPU cost drops. Correct for slow ambient effects, visibly choppy for sparkles and streams.

Pooling. The shader material is rented from a shared pool (UIParticleMaterialPool, 32 instances per source). Sprite particle GameObjects are pooled at initialization with cached RawImage and RectTransform components.

Public API.

  • Play() — restarts the cycle from the beginning.
  • Stop() — stops playback and hides all particles.
  • RestartPreview() — alias for Play.
  • SetMaterial(Material newMaterial) — swaps the source material and restarts.
  • RefreshGlowMaterialAndRestart() — re-instantiates the runtime material from the current source, picking up live Inspector edits, and restarts.
  • IsPlaying (property).

GlowMeshPlayer

Standalone world playback. Runs the shader into a RenderTexture, then binds that texture to the target MeshRenderer’s material. This is the component inside every WorldEffects prefab.

Playback settings. Lifetime (0.5 to 5 s, default 2; baked into the material at startup and read-only afterwards). Pause between cycles (0 to 3 s, default 0.5). Playback speed (0.1 to 4, default 1). Loop. Destroy on end.

Performance settings. Resolution: RES_256, RES_512, RES_1024 (default RES_512). Blit frame rate: FPS_24, FPS_30, FPS_60, Unlimited (default Unlimited).

Material settings. Effect material (hidden from the Inspector; set via SetGlowMaterial). Target renderer (auto-resolved from the same GameObject or a child). Texture property (default _BaseMap for URP; _MainTex for Built-in).

Warm-up. Three blits are submitted before the renderer is enabled, so the first visible frame is always correct. This avoids the one-frame garbage flash that can occur when the GPU has not yet compiled the shader or cleared the RenderTexture. Warm-up bypasses the blit throttle.

Camera-callback blit. The blit is driven by a camera callback, not by LateUpdate. This is what guarantees ordering on every driver. Built-in uses Camera.onPreRender; SRP uses RenderPipelineManager.beginCameraRendering. Editor preview cameras are skipped.

Pooling. RenderTextures are rented from a pool keyed by size (16 instances per size). Materials are rented from a pool keyed by source InstanceID (32 instances per source). The target renderer’s material is restored to the original shared material on destroy.

Public API.

  • Play() — restarts the cycle from the beginning.
  • Stop() — stops playback and clears the RenderTexture.
  • SetNormalizedTime(float t01) — scrubs the animation to a normalized position 0 to 1; the current cycle continues from there.
  • SetGlowMaterial(Material mat) — swaps the source material and restarts.
  • RefreshGlowMaterialAndRestart() — re-instantiates the runtime material from the current source and restarts.
  • IsPlaying, HasCompletedCycle (properties).

Inspector extras. Play, Stop and Refresh buttons in Play Mode. A status label. A display material health check that verifies the target renderer’s shader and texture property against the active pipeline and offers a Fix button when they are wrong.

VfxController

Convenience spawner for world effects. SpawnUniversalVfxEffect(GameObject effectPrefab, Vector3 position, bool autoCleanup = true) instantiates the prefab under a configured parent, moves it to the requested world position, and (with autoCleanup) registers it for auto-destroy on the first completed one-shot cycle. Looping effects are left alone, because HasCompletedCycle flips to true at the end of every cycle and would otherwise destroy them after one loop.

Public API.

  • SpawnUniversalVfxEffect(GameObject effectPrefab, Vector3 position, bool autoCleanup) — instantiates and returns the spawned GameObject.

Field. globalVFXHolder — the parent transform under which spawned effects are placed.

ContinuousRotation

A small utility component. Rotates a GameObject around any combination of X, Y and Z axes at a configurable speed. Useful for rotating display items or for spinning a static effect prefab in a showcase scene.

Fields.

  • rotationSpeed — degrees per second, default 50.
  • axisX, axisY, axisZ — booleans that enable rotation around each axis, all off by default.

ReadOnlyAttribute

A property attribute and its inspector drawer for read-only fields. Marks a field as disabled in the Inspector, either always or only in Play Mode. Used by the players for fields that are baked at startup (lifetime, hidden renderer references, shader-handled properties) and are not meant to be edited in the Inspector.

Constructor. ReadOnlyAttribute(bool onlyInPlayMode = false). When onlyInPlayMode is true, the field is editable in Edit Mode and disabled in Play Mode.

Drawer. The property drawer applies a gray tint to the disabled field for readability. The change is visual only; the underlying value is never modified.

Editor tools

Three editor features ship with the asset: the effect prefab wizard, the Play Mode inspector controls on every player, and the display material health check on GlowMeshPlayer. All three exist to keep designers out of code and out of manual asset wiring.

Effect prefab wizard

Menu path. Assets > Create > Procedural VFX Toolkit > Effect Prefab...

What it does. Opens a small window that builds a ready-to-use prefab and its effect material from any shader in the family. The wizard scans the project for shaders whose name starts with UniversalProceduralVfx/, sorts them alphabetically, and shows the family name without the prefix (for example Fireflies instead of UniversalProceduralVfx/Fireflies).

Two target types.

  • UI. Creates a RectTransform, a RawImage and a ParticlePreviewPlayer. The RawImage has no texture and no color tint; the effect material supplies the visual. The player receives a fresh material in its Glow Material slot.
  • World. Creates a Quad (with the MeshCollider removed), a MeshRenderer and a GlowMeshPlayer. The MeshRenderer keeps a shared display material; the player clones it per instance and injects its RenderTexture there.

Defaults.

SettingUI targetWorld target
Lifetime2 s2 s
Pause between cycles0.5 s1 s
Playback speed0.51
Loopoffoff
Destroy on endonon
Size / Resolution120 × 120 pxRES_512

Output. A folder Assets/OctantaStudio/TouchEffectSystem/Prefabs/{EffectName}/ is created (or reused). Inside, the wizard saves {EffectName}.prefab and {EffectName}_Effect.mat. The material is created from the chosen shader, so its editable properties are already exposed in the Inspector. The prefab is created with PrefabUtility.SaveAsPrefabAsset; the temporary GameObject in the scene is destroyed after the save.

Pipeline handling for the World target. The wizard resolves the display material for the active pipeline before building the prefab. It prefers the pre-authored material shipped under Prefabs/Sources/WorldMaterials: URPMat_UnlitTransparent for URP, TemplateMat_UnlitTransparent for Built-in and HDRP. When the material file is missing, a fallback is created on the fly. In both cases the shader reference is verified and repaired when needed; the URP transparency settings (blend modes, ZWrite, render queue, keyword) are enforced so the material behaves as if set up through the Inspector.

Failure handling. If the user cancels the save dialog, the wizard deletes the folder it created. If prefab creation fails, the effect material is deleted.

Play Mode inspector controls

Every player component ships with a custom inspector that adds controls above the default fields. The controls are active only in Play Mode; outside Play Mode, a HelpBox explains that the buttons require the game to run.

  • How Do I Use It? — a purple button at the top that opens the relevant GitBook page for the component.
  • Play — a green button that calls Play() on the player.
  • Stop — a red button that calls Stop().
  • ↻ (Refresh) — a small square button that calls RefreshGlowMaterialAndRestart(). Its purpose is to pick up live Inspector edits to the source material and restart from frame 0 without leaving Play Mode. The button is rendered conditionally: it is not shown outside Play Mode.
  • Status label — a one-line “Playing” or “Stopped” label below the buttons.

ParticlePreviewPlayer and GlowMeshPlayer both hide the destroyOnEnd field while loop is on, because the option has no effect in that mode.

Display material health check

GlowMeshPlayer’s inspector adds a check that verifies the target MeshRenderer’s display material against the active render pipeline. It works in Edit Mode too, mirroring the same auto-resolve that the component performs at runtime.

What it checks.

  • The MeshRenderer’s current shader name matches the expected shader for the active pipeline: Universal Render Pipeline/Unlit for URP, Unlit/Transparent for Built-in and HDRP.
  • The textureProperty field matches the expected property for the active pipeline: _BaseMap for URP, _MainTex for Built-in and HDRP.
  • The MeshRenderer exists on the GameObject or a child.

When the check passes. A green info box shows the pipeline label, the current material name, the shader name and the texture property. No Fix button is shown: rewriting the shared material when nothing is broken would detach the runtime mesh material and break a running effect.

When the check fails. A warning box lists which check failed and why. A yellow Fix button appears with the label Fix {Pipeline} Display Settings. Clicking it:

  1. Locates the shipped display material for the pipeline under Prefabs/Sources/WorldMaterials, creating it from the expected shader when missing.
  2. Verifies the material’s shader reference; a broken reference is repaired in place.
  3. Applies the URP transparency settings (only on URP).
  4. Assigns the material to the renderer’s sharedMaterial, marks the renderer dirty, and saves the assets.
  5. Updates the textureProperty field to the expected value through a SerializedObject, so the change is recorded in the undo system and survives an editor reload.

ReadOnly fields in the inspector

Fields marked with the ReadOnly attribute are drawn with a gray tint and disabled in the Inspector. The typical cases:

  • glowMaterial on the players — the source is meant to be swapped through SetGlowMaterial from code, not through the Inspector.
  • targetRenderer on GlowMeshPlayer — auto-resolved from the same GameObject or a child; manual assignment is not part of the intended workflow.
  • lifetime on GlowMeshPlayer and ParticlePreviewPlayer — baked into the material at startup; changing it in Play Mode would desync playback.
  • shaderParticleSize on ParticlePreviewPlayer — applied once at startup.
  • Platform-tuning fields on SparkleSpawner, TouchGlowUI and TouchTextUI — read-only because the values are pre-authored and changing them mid-session would produce inconsistent visuals.

Shader library

The toolkit ships with 50+ production-ready shaders in the UniversalProceduralVfx/ family. Every one shares the same property layout, so any effect can be swapped for another by replacing the material. Nine representative shaders are documented in the AI prompt file with full HLSL source; they are the model that new effects are built on.

Effect cycle structure

Every shader follows the same mandatory structure. The rules are structural, not visual: the look varies freely, the frame does not.

  • Lifetime cycle. The shader reads _TimeNow and _StartTime, computes a normalized age, and discards every pixel outside [0, 1). Nothing renders before birth or after death.
  • Transparent background. No filled rectangle. The effect lives inside the particle’s UV bounds and nowhere else.
  • Bounded effect. The shader fades near the UV boundary, so the quad edge never shows.
  • Seed. A per-cycle _RandomSeed written by the player at every cycle start. The same shader produces a different layout each time; a fixed seed locks the layout.
  • Preview mode. Most shaders detect an unset _TimeNow (near 0) and display a mid-cycle snapshot. This makes the material render a representative frame in the Editor’s material preview without needing the game to run.

System properties

These are injected by the player components and never edited by hand:

PropertyTypeMeaning
_MainTexsampler2Dsystem texture slot; no texture is bound for procedural shaders
_TimeNowfloatcurrent wall-clock time in seconds, written every frame or every blit
_StartTimefloattimestamp at which the current cycle began
_Lifetimefloattotal cycle length, baked once by the player at startup
_Scalefloatglobal scale factor applied inside the shader
_RandomSeedfloatper-cycle random value written on every cycle start

Two more system properties are used by shaders that support hold-to-freeze behavior (OneTouch mode in TouchGlowUI):

PropertyTypeMeaning
_OneTouchHoldAgefloat (0 to 1)the normalized age at which the effect freezes while held; used when _HoldingForbidden is 0
_HoldingForbiddentogglewhen on, the effect does not freeze while held; when off, it freezes at _OneTouchHoldAge

Some shaders also declare _UseMobileOptimization as a float flag, set by TouchGlowUI based on the detected platform. Shaders that read it can reduce loop iterations on mobile.

Blend modes

  • Additive (Blend One One). Accumulates light: glows, sparks, healing auras, explosions, fireflies. The default for effects that read as emitting.
  • Alpha (Blend SrcAlpha OneMinusSrcAlpha). Standard transparency: comic impacts, force fields, shockwaves, puffs, outlines. The default for effects that read as solid shapes.

Both modes use Cull Off, ZWrite Off and ZTest LEqual, which is the correct setup for transparent UI and world quads alike.

The nine sample shaders

The following nine shaders are documented in the AI prompt file with their full HLSL source. Each is a working, shippable effect in its own right and also the template for new effects. The parameter ranges are the ones exposed in the Properties block, so they are the values a designer can adjust on the material.

ShaderBlendWhat it drawsPrimary designer properties
Fireflies additive drifting glowing fireflies with a soft pulse, orbiting outward from the center _FireflyColor, _GlowColor, _FireflyCount 8–24, _FireflySize 0.015–0.08, _FlightRadius 0.2–0.8, _FlightSpeed 0.3–2, _FloatAmplitude 0.05–0.3, _PulseSpeed 0.5–4, _GlowIntensity 0.5–3
HealingAura additive five-layer healing effect: center energy burst with a cross flare, spiraling healing waves with turbulence, floating sparkles with cross rays _WaveColor, _CoreColor, _WaveCount 0–6, _WaveThickness 0–0.1, _ExpansionSpeed 0.3–2, _RotationSpeed 0.5–3, _FlowSpeed 0.5–3, _Turbulence 0–0.3, _Brightness 0.5–3, _BurstIntensity 0.5–3, _BurstSize 0.05–0.2, _SparkleCount 4–15, _SparkleSize 0.01–0.04
HealingPluses additive floating plus symbols rising from a healing point, with a soft glow behind each plus _PlusColor, _GlowColor, _PlusCount 5–20, _PlusSize 0.02–0.08, _PlusThickness 0.3–0.7, _RiseSpeed 0.5–2.5, _SpreadRadius 0.05–0.5, _VerticalSpread 0–0.5, _Brightness 0.5–3, _PulseSpeed 0–4
RadialSparks additive five-layer fire burst: primary sparks, long energy streaks, ember scatter, a central FBM-deformed glow ball, and a bright birth flash _ColorCore, _ColorHot, _ColorMid, _ColorEmber, _ColorGlow, _SparkCount 8–40, _SparkSpeed 0.5–2.5, _SparkSpread 0.1–0.5, _StreakCount 0–8, _StreakLength 0.05–0.45, _EmberCount 0–30, _GlowRadius 0.05–0.35, _GlowIntensity 0–4, _CenterFlash 0–2
TouchPointForceFieldHex alpha hexagonal force-field pattern with an expanding ring wave, opacity held constant behind the wave front _LineColor, _HexSize 3–15, _LineThickness 0.01–0.08, _LineOpacity 0–1, _WaveWidth 0.05–0.2
VibroImpact alpha expanding polygonal shockwave rings with a light distortion, comic impact aesthetic _WaveColor, _EdgeColor, _WaveCount 2–8, _WaveThickness 0.01–0.15, _WaveIntensity 0.5–2, _Sharpness 1–10, _PolygonSides 4–12, _ExpandSpeed 1–5, _Distortion 0–0.5
ComicImpactLayers alpha comic-style spiky impact with three color layers, selective outlines and scattered detail elements _Scaling, _Fading toggles, _FlashColor, _Layer1Color, _Layer2Color, _Layer3Color, _OutlineColor, _Layer1Radius 0–0.25, _Layer2Radius 0–0.5, _Layer3Radius 0–0.5, _SpikeSharpness 0.01–0.8, _OutlineWidth 0.008–0.025, _OutlineCoverage 0.3–1, _DetailCount 4–16
ComicPuff alpha comic-style cloud puff made of clustered bubbles with a soft animated expansion and outline _Scaling, _Fading toggles, _PuffColor, _OutlineColor, _OutlineWidth 0–0.05, _BubbleCount 3–12, _BubbleSize 0.05–0.2, _BubbleSoftness 0.01–0.1, _ExpansionSpeed 0.5–3, _FloatSpeed 0–2
Explosion additive heat-gradient fireball with a FBM-distorted boundary, flying debris and an initial white-hot flash _Scaling, _Fading toggles, _ColorCore, _ColorHot, _ColorWarm, _FlashIntensity 0–3, _FlashSize 0.02–0.15, _FlashDuration 0.05–0.3, _FireballSize 0.1–1, _FireballComplexity 2–10, _FireballDistortion 0–5, _DebrisCount 10–40, _DebrisSpeed 0.3–1.5

Most shaders additionally expose a _Brightness or _GlowIntensity multiplier, a pulse speed, and one or two designer-facing colors. The exact property list for each shader is documented in the header of the corresponding .shader file.

The AI prompt file

The toolkit ships a particle-shader-prompt.md file that documents the shader structure, lists the nine samples with their full HLSL source, and gives an AI model the rules it needs to produce a new effect in the same family. The file is self-contained: it can be dropped into any AI coding session and iterated on without further setup.

What the prompt file contains.

  • Goal statement. A high-quality, animated, procedurally generated VFX effect in the style of the project and according to the user’s descriptions.
  • Workflow. A four-step iteration: read the samples as references, describe the visual, receive a base version that follows the technical specification exactly, refine.
  • Visual freedom. The new visual does not have to resemble the samples. Direction, colors and vibe are all free; only the structure is carried over.
  • Mandatory structure. Three rules that take priority over any visual design: lifetime cycle, transparent background, bound containment.
  • Constraints. Syntax must be flawless; avoid overly complex elements such as line.
  • Sample sources. Nine full HLSL files: Fireflies, HealingAura, HealingPluses, RadialSparks, TouchPointForceFieldHex, VibroImpact, ComicImpactLayers, ComicPuff, Explosion.

Custom shader creation

  1. Copy any sample shader and rename its Shader "..." directive inside the UniversalProceduralVfx/ family, so it appears in the wizard and in the shader picker.
  2. Replace the property block with the desired colors, counts, sizes and speeds.
  3. Keep the header block untouched. _MainTex, _TimeNow, _StartTime, _Lifetime, _Scale and _RandomSeed are read by the players and must remain declared.
  4. Keep the age guard, the edge fade and the bound containment at the end of the fragment shader.
  5. Create a material from the shader and assign it to the Glow Material slot of any player component. The effect works in every player that supports the size and pipeline of the target.

For custom work, Octanta Studio accepts direct commissions: buy the asset, describe the visual, receive a custom .unitypackage.

Effect prefabs

An effect prefab is the delivery unit. It is a GameObject with a player component, a material in the Glow Material slot, and a target to draw on. The two families differ in their target type, not in their logic: the player inside a UI prefab is one of the four UI players, the player inside a world prefab is GlowMeshPlayer.

UI prefabs

UI prefabs live under Prefabs/TouchEffects. A UI prefab contains:

  • A RectTransform.
  • A RawImage with the effect material bound to it (or a target Renderer when driven by GlowMeshPlayer).
  • One of the four UI players: TouchGlowUI, SparkleSpawner, TouchTextUI, or ParticlePreviewPlayer.
  • The player references an InputController, a Canvas and a set of prefabs for its own sub-effects (trail points, sprite particles, text objects).

The Glow Material on the RawImage is what defines the visual. Replacing it swaps the effect. The sprite particle prefab and the sprite textures list are similarly swappable.

World prefabs

World prefabs live under Prefabs/WorldEffects. A world prefab contains:

  • A Quad with a MeshRenderer.
  • A shared display material from Prefabs/Sources/WorldMaterials: URPMat_UnlitTransparent for URP, TemplateMat_UnlitTransparent for Built-in and HDRP.
  • A GlowMeshPlayer referencing an effect material in its Glow Material slot.

A URP variant and a Built-in / HDRP variant ship for every shader, because the display shader and the texture property differ between pipelines. The variants are otherwise identical.

The PreviewEffect prefab

A special standalone UI prefab that ships in TouchEffects > PreviewEffect. It contains a ParticlePreviewPlayer with a Glow Material slot and a preview sprite system configured. It is intended as the starting point for any standalone UI effect: duplicate it, replace the material and the sprite particle prefab, and spawn it from code or place it under a Canvas.

Folder structure

  • Assets/OctantaStudio/TouchEffectSystem/Prefabs/TouchEffects — input-driven UI prefabs. Contains one prefab per effect (TouchInkTrail, TouchCircle, and others) plus the PreviewEffect sub-folder.
  • Assets/OctantaStudio/TouchEffectSystem/Prefabs/TouchEffects/PreviewEffect — standalone UI prefab.
  • Assets/OctantaStudio/TouchEffectSystem/Prefabs/WorldEffects — standalone world prefabs. Contains URP variants and Built-in / HDRP variants of every effect.
  • Assets/OctantaStudio/TouchEffectSystem/Prefabs/Sources/WorldMaterials — the shared display materials used by world prefabs.

Getting started

Input-driven UI effect in one minute

  1. Open Assets > OctantaStudio > TouchEffectSystem > Prefabs > TouchEffects.
  2. Add any effect prefab (for example TouchInkTrail) to the scene Canvas and unpack it.
  3. Check the InputController’s InputSystemType and set it to Old or New to match the project.
  4. Run the scene. The effect responds to every tap and swipe.

Standalone UI effect

  1. Open TouchEffects > PreviewEffect and duplicate the prefab, or use it as is.
  2. Replace the Glow Material and, optionally, the Sparkle Particle Prefab to configure a new effect.
  3. Spawn the prefab in the required context, for example as a child of a Canvas:
    ParticlePreviewPlayer s = Instantiate(sparkPrefab, canvas.transform);
    s.transform.position = Vector3.zero;
    The caller sets the position after instantiation.

Standalone world effect

  1. Open WorldEffects and pick a prefab, for example URP_VFXRadialSparks (URP) or VFXRadialSparks (other pipelines).
  2. Duplicate the prefab or use it as is; replace the Glow Material to change the effect.
  3. Spawn the prefab at the required world position, for example through the VfxController:
    vfxController.SpawnUniversalVfxEffect(strikeEffectPrefab, targetPosition);
    The controller places the instance under a configured parent and auto-cleans it up after the one-shot cycle.

Creating new effect prefabs

  1. Open Assets > Create > Procedural VFX Toolkit > Effect Prefab....
  2. Choose the target: UI or World.
  3. Pick a shader from the list. The family prefix is stripped in the dropdown.
  4. Give the effect a name. The default name matches the shader.
  5. Click Create Prefab and choose where to save. The wizard creates the folder, the prefab and the effect material.

Custom effects

Two paths lead to new effects without the designers touching HLSL. The first is to copy an existing material and adjust its exposed properties. The second is to use the AI prompt file: describe the visual, receive a new shader that follows the same structure, save it under UniversalProceduralVfx/, and use the wizard to build the prefab. For fully custom work, contact Octanta Studio directly.

Performance

Resolution

The shader runs per pixel of a square RenderTexture. Cost scales with the square of the side length:

SettingSidePixels per blitRelative cost
RES_25625665,5361×
RES_512512262,1444×
RES_102410241,048,57616×

The texture is upscaled and bilinearly filtered onto the mesh, so for a soft glow the visual difference between 256 and 1024 is small. Choose 256 for mobile or many concurrent effects, 512 as the default, 1024 for hero effects on capable hardware. Only power-of-two sizes are exposed: tile-based mobile GPUs (Mali, Adreno, PowerVR) handle them most efficiently, and non-power-of-two textures can silently fall back to a slower path.

Blit rate

By default the shader runs once per render frame. A per-effect throttle caps it at 24, 30 or 60 blits per second. The animation still advances at correct wall-clock speed — only the visual refresh rate of the RenderTexture is reduced. Between blits the mesh samples the previous valid frame.

The throttle is not universal. It helps slow pulses, ambient glows, fog and held frames. It hurts sparkles, streams, rising sparks, fast flicker and sharp flashes. The recommended order of optimization is:

  1. Lower the resolution first. It does not change visible smoothness for a soft glow.
  2. Simplify the shader second — fewer loop iterations, fewer noise octaves.
  3. Throttle the blit rate third, and only for genuinely slow effects.

Warm-up blits and manual scrubbing through SetNormalizedTime always bypass the limit.

UI frame rate throttle

ParticlePreviewPlayer has its own throttle on the shader time value: FPS_24, FPS_30, FPS_60, Unlimited. The shader still renders every frame on the RawImage; only the frequency of fresh _TimeNow writes changes. This saves the per-frame SetFloat calls when many preview particles are on screen, but does not save GPU time. Same guidance as above: correct for slow effects, visibly choppy for sparkles and streams. The sprite subsystem inside the same component is not affected and always updates every frame.

Pooling

RenderTextures and Materials are rented and returned from static pools. On mobile this is critical: repeatedly creating and releasing a 512×512 RenderTexture fragments the GPU driver’s internal heap, and the memory is not returned to the operating system even after Destroy. The pool keeps at most 16 RenderTextures of each size and 32 materials per source; overflow instances are destroyed instead of growing the pool. Across a session the total stays at the peak concurrent count, which never grows.

Sprite pool

Sprite-based effects pool their particle GameObjects. Each pooled particle caches its RawImage and RectTransform, so the per-frame update loop does not touch GetComponent. The pool size is configured on the player (default 12 for ParticlePreviewPlayer, bounded by the platform settings for SparkleSpawner). When the pool runs empty, older particles are recycled.

Text pool

TouchTextUI pre-creates a pool of 20 TextMeshPro objects with cached components. When the pool runs empty, the oldest active text is recycled. Each text carries its own pre-calculated animation vectors so the per-frame update is a small number of multiplications.

Material update throttle

TouchGlowUI batches shader time updates and applies them at most 30 times per second (MATERIAL_UPDATE_INTERVAL = 1/30). Each point also has a minimum update interval (MIN_UPDATE_THRESHOLD = 0.01) so the same point is not re-uploaded twice in a frame. The point size changes triggered by sharp-edge tapering are computed once at spawn and cached; the per-frame loop only interpolates position and lifetime-based alpha.

Cleanup service

A session-scoped service calls Resources.UnloadUnusedAssets() every 15 seconds. When a Material, RenderTexture or Mesh is destroyed, Unity moves it into an internal unused-assets list that is only cleared by that call. In a single-scene game with many spawn and despawn cycles the list grows indefinitely, adding CPU scanning cost to every subsequent asset operation. The cleanup service spreads the unload over a few frames so the cost is practically invisible. The pools keep their instances C#-alive, so the unload does not touch them.

Two cleanup services exist in the codebase (one for GlowMeshPlayer, one for ParticlePreviewPlayer). Only one runs per session: the second checks the scene for an existing type whose name contains “CleanupService” and skips creating its own instance when one is present.

Warm-up

GlowMeshPlayer submits three warm-up blits before the renderer is enabled. This primes the GPU pipeline so the first visible frame is always correct. Without it, the first frame can flash garbage when the shader has not yet been compiled or the RenderTexture’s GPU memory has not been cleared. Warm-up bypasses the blit throttle so the three blits complete within a few frames.

Memory lifecycle

  • Startup: RenderTexture and both Material instances are rented from pools. The target renderer is hidden.
  • Warm-up: three blits into the RenderTexture. The renderer is enabled after the third blit.
  • Playback: one blit per frame (subject to throttle) or a fresh _TimeNow write per frame for UI.
  • End of cycle: for a one-shot effect, a pending final blit fires before destroy. For a looping effect, a pause begins and Play is re-invoked after pauseBetweenCycles.
  • Destroy: RenderTexture and Materials are returned to their pools. The target renderer’s material is restored to the original shared material.
  • Backgrounding: on re-enable, the RenderTexture is recreated when it lost its GPU allocation, the material binding is restored, and playback resumes if it was playing before the disable.

Compatibility

Unity versions

Built with Unity 6000.0.42f1. Compatible with 6000.3.26f1 and newer. Older Unity versions may need the Unity UI package installed; the code itself only uses standard Unity components and classes.

Render pipelines

  • Built-in Render Pipeline — full support. Uses _MainTex and an Unlit/Transparent display material.
  • Universal Render Pipeline (URP) — full support. Uses _BaseMap and a Universal Render Pipeline/Unlit display material. The wizard and the material health check pick the URP variant automatically.
  • High Definition Render Pipeline (HDRP) — full support. HDRP reuses the Built-in display path, which works without additional setup.
  • Switching pipelines in an open project triggers a one-click Fix in the GlowMeshPlayer inspector when the display material was not updated.

Platforms

  • Windows 10 / 11 — tested on PC with consistent performance.
  • Android API 24+ — tested on mid-range mobile devices with consistent performance.
  • Other platforms — the shader family uses HLSL with a target of 2.0 or higher and no compute shaders, so any platform that supports HLSL and standard Unity shaders should work.

Dependencies

Standard Unity components only. No third-party libraries. The Input System package is used only when the project has ENABLE_INPUT_SYSTEM defined; the Old Input Manager path is compiled out in that case and the project picks one path at build time. The Unity UI package and the TextMeshPro package are required on older Unity versions; newer versions include both.

Canvas render modes

All three Canvas render modes are supported by the four UI players: Screen Space Overlay, Screen Space Camera, World Space. Screen-to-local coordinate conversion is handled by RectTransformUtility and picks the right camera for each mode. A fallback ratio conversion is applied when the primary conversion fails, so a mis-configured Canvas still produces a usable effect.

Input System

Old and New Input System are both supported through one API. The InputController’s inputSystemType field selects which one is read. A project that uses the New Input System for everything can still drive the toolkit through the same unified calls, and a project that uses the Old Input Manager keeps working without any additional setup.

Glossary

Blit
A full-screen shader pass that writes the shader output into the effect’s RenderTexture. One blit updates the visual once. World effects blit once per frame or once per throttle window; UI effects do not blit. See performance.
Blit rate
A per-effect cap on how many blits happen per second: 24, 30, 60 or unlimited. Correct only for slow effects. See performance.
Camera callback
The point in the render loop where GlowMeshPlayer submits its blit, before the camera draws the mesh that samples the RenderTexture. Built-in uses Camera.onPreRender; SRP uses RenderPipelineManager.beginCameraRendering. See design highlights and how it works.
Dispersion
A pattern that determines where a sprite particle spawns relative to the touch point and in which direction it moves. Eight values in the sprite and text systems. See sparkle spawner.
Effect prefab
A GameObject with a player component and a material. Drop it on a Canvas or in the world; the player handles the rest. See effect prefabs.
Glow material
A material built on one of the toolkit’s shaders. Swapping it changes the effect; the player component reads it as a template. See shader library.
Health check
An inspector check on GlowMeshPlayer that verifies the target renderer’s display shader and texture property against the active render pipeline, with a one-click Fix. See editor tools and design highlights.
Input-driven effect
An effect attached to the InputController. The player’s finger or mouse drives it: trails follow movement, one-touch effects appear on tap. See core components.
Lifetime cycle
One full playback of an effect, from the start of the animation to its end. Looping effects run cycles back to back with a pause; one-shot effects run a single cycle and stop. See how it works.
OneTouch
An input mode where a single tap produces a single burst (or, in TouchGlowUI, a single persistent particle that follows the touch and fades on release). The opposite of a trail. See key features.
Pipeline detection
The automatic check GlowMeshPlayer and the wizard perform on the active render pipeline to choose the correct display material and texture property. Built-in uses _MainTex; URP uses _BaseMap; HDRP reuses the Built-in path. See design highlights and how it works.
Pool
A static collection of reusable RenderTextures, Materials or GameObjects. Instead of creating and destroying instances, the players rent and return them. See performance.
Preview mode
A convention in the shaders that displays a mid-cycle snapshot when _TimeNow is near 0, so the material preview in the Editor shows a representative frame. See shader library.
RenderTexture
A GPU-side texture that receives shader output for a world effect. Bounded in cost and pooled across instances. See performance.
Resolution
The side length of the effect’s RenderTexture: 256, 512 or 1024. Cost scales with the square of the side. See performance.
Seed
A per-cycle random value written into the material. Keeps consecutive spawns looking different. See shader library.
Shader-based effect
An effect whose visual comes entirely from a shader. No textures, GPU only. The main rendering mode. See design highlights and how it works.
Sharp edges
A TouchGlowUI feature that tapers the trail at the start and at the end so it does not begin or end abruptly, and adds intermediate particles where the taper gets too thin. See touch glow UI.
Sprite-based effect
An effect built from pooled 2D particles with a texture. Complements the shader mode for sparkles and glitter. See how it works.
Standalone effect
An effect that plays on its own, detached from input. Spawned via Instantiate or through VfxController. See core components.
Taper
A gradual scale change applied to the first or last few trail points so the trail thins at its ends. See touch glow UI.
Text-based effect
An effect built from pooled TextMeshPro objects with a movement animation and a fade animation. See how it works.
Trail
An input mode where the effect follows the finger or mouse and spawns points at a spacing threshold. The opposite of OneTouch. See key features.
Warm-up
Three blits submitted before the renderer is enabled, so the first visible frame is already correct. See design highlights, glow mesh player and performance.
Wizard
The editor window at Assets > Create > Procedural VFX Toolkit > Effect Prefab... that builds a ready-to-use effect prefab and its material from any shader in the family, with pipeline-aware display material setup. See editor tools and design highlights.
World-space effect
An effect drawn by GlowMeshPlayer on a MeshRenderer in the 3D scene, as opposed to on a Canvas. See glow mesh player.

Sources

Every technical claim on this page was checked against the asset’s source code and shipped documentation. Each section of the page traces to one or more of the files below; sections that describe behavior in prose are backed by the corresponding code paths.

Page sectionPrimary source(s)Notes
Facts, Overview, What ships in the box Input-driven and standalone visual effects. Built.txt, ReadMe.txt, store listing Unity 6000.0.42f1 and 6000.3.26f1: store listing and store description. Windows 10/11 and Android API 24+: store listing. 50+ shaders and “under 0.1 ms” trail benchmark: store listing. Built-in / URP / HDRP and no third-party libraries: store description. “Developer: Octanta Studio” from the Assets/OctantaStudio/… paths and from the octanta-studio.gitbook.io URL in the source; the “(Ukraine)” qualifier comes from the studio’s other public materials and is not stated in the asset’s own source.
Key features Store description, ReadMe.txt, particle-shader-prompt.md, player source files Every stated feature corresponds to a component or setting in the code: unified effect structure (all three players share the material layout), seed randomization (_RandomSeed written per cycle), three rendering modes (TouchGlowUI, SparkleSpawner, TouchTextUI), OneTouch/Trail (SparkleMode and GlowMode), sound design (InputController), editor tooling (TouchEffectPrefabWizard, *Editor classes).
How it works GlowMeshPlayer.cs, ParticlePreviewPlayer.cs, TouchGlowUI.cs, SparkleSpawner.cs, TouchTextUI.cs, particle-shader-prompt.md Camera callback path (Camera.onPreRender, RenderPipelineManager.beginCameraRendering): GlowMeshPlayer.cs. Pools with 16 RTs per size and 32 materials per source: RenderTexturePool.MaxPerSize = 16, MaterialPool.MaxPerKey = 32. Cleanup every 15 s: GlowCleanupService.IntervalSeconds = 15f. The effect structure (lifetime, transparency, bounds, preview) is the exact structure required by particle-shader-prompt.md.
Design highlights — pipeline universality GlowMeshPlayer.cs, TouchEffectPrefabWizard.cs, GlowMeshPlayerEditor (in GlowMeshPlayer.cs) GraphicsSettings.currentRenderPipeline check: GlowMeshPlayer.Validate and GlowMeshPlayerEditor.IsUrpActive. Pre-authored display materials and EnsureTransparentSettings: TouchEffectPrefabWizard.TryResolveWorldDisplayMaterial. One-click Fix: GlowMeshPlayerEditor.FixDisplayMaterial.
Design highlights — render ordering GlowMeshPlayer.cs WarmUpBlits = 3, inWarmUp flag, pendingFinalBlit field, and the LateUpdate fallback that destroys the object even when no camera fires. Also OnDisable/OnEnable handling for renderer material restore and RenderTexture recreation.
Design highlights — shader-only effects particle-shader-prompt.md, GlowMeshPlayer.cs, ParticlePreviewPlayer.cs All shader samples declare only the six mandatory system properties and the designer-facing parameters; no textures are bound. Same material works in both players because both players read only the material’s properties and set _TimeNow/_StartTime/_RandomSeed.
Input system InputController.cs Touch phases: enum TouchPhase { Began, Moved, Stationary, Ended, Canceled }. Input system types: enum InputSystemType { Old, New }. Mouse input types: enum MouseInputType { Both, LMBOnly }. Operation modes: enum OperationMode { Default, ManuallyCall }. Object types: enum ObjectTypeEnum { UI, _3D, _2D, AnyType }. Interaction targets: enum InteractionTargetEnum { ByGameObject, ByTag, ByLayer, AnyTarget }. Sound fields: maxSimultaneousSounds = 3, defaultVolume = 0.5f, randomStereo = false. Public API method list is the exact set of public methods in the class.
TouchGlowUI TouchGlowUI.cs Mode enum GlowMode { OneTouch, Trail }. oneTouchMultiTouchLimit = 10. Sharp edges: taperStartScale = 0.15f, end taper to 0.1f. Platform defaults: desktopMaxPoints = 512, mobileMaxPoints = 512, desktopGlowLifetime = 2f, desktopPointSize = new Vector2(120f, 120f), mobilePointSize = new Vector2(150f, 150f), desktopBaseTrailSpacing = 10f, mobileBaseTrailSpacing = 8f, desktopTargetFPS = 60f, startTaperPointsDesktop = 64, endTaperPointsDesktop = 64, startTaperPointsMobile = 32, endTaperPointsMobile = 32. sizeMultiplier is Range(0.1f, 2.0f). MATERIAL_UPDATE_INTERVAL = 1f / 30f, MIN_UPDATE_THRESHOLD = 0.01f. initializationDelay = 0.1f. Public methods: ShowEffect, EnableTouch, DisableTouch.
SparkleSpawner SparkleSpawner.cs Dispersion: enum DispersionType { None, Radial, RadialSymmetric, Down, Left, Right, Up, Inward } — eight values. Fades: enum FadeAnimationType { FadeAndScale, Fade, Scale }. Rotation: enum RotationType { None, Radial, Random }. Platform defaults: desktopMaxPoints = 512, mobileMaxPoints = 512, desktopSparkleLifetime = 1f, desktopMinPointSize = 20f, desktopMaxPointSize = 40f, desktopSpacing = 20f, mobileSpacing = 10f, desktopMinSparklePoints = 8, desktopMaxSparklePoints = 16, desktopMinRadius = 80f, desktopMaxRadius = 120f. Default colors are { Color.white, Color.yellow, Color.cyan, Color.magenta }. Gizmos: OnDrawGizmosSelected. Public methods: ShowEffect, EnableTouch, DisableTouch.
TouchTextUI TouchTextUI.cs Appearance: enum AppearanceAnimationType { None, RadialRandom, RadialArc, Down, Left, Right, Up, ZoomIn, ZoomOut, Bounce } — ten values. Disappearing: enum DisappearingAnimationType { FadeAndScale, Fade, Scale }. Radial arc: radialArcAngleRange = 35f, radialArcCenterAngle = 90f, i.e. 55–125 degrees. Bounce: bounceOvershootPhase = 0.6f, bounceSpringBackPhase = 0.4f, bounceOvershootMultiplier = 1.3f. Platform defaults: desktopTextLifetime = 1f, desktopMinFontSize = 24, desktopMaxFontSize = 48, desktopMinMoveDistance = 50f, desktopMaxMoveDistance = 150f. Text defaults: {"+1", "+10", "BOOM"} and { Color.white, Color.yellow }. Pool: maxTexts = 20. textBasicSizeDelta = new Vector2(100, 100). initializationDelay = 0.1f.
ParticlePreviewPlayer ParticlePreviewPlayer.cs Playback: particleLifetime = 2.0f (Range(0.5, 5)), playbackSpeed = 1.0f (Range(0.1, 3)), pauseDuration = 0.5f (Range(0.1, 2)). Shader particle size: shaderParticleSize = new Vector2(120f, 120f). Sprite: poolSize = 12 (Range(0, 24)), minRadius = 40f, maxRadius = 80f, spriteParticleSize = 30f. Frame rates: enum UIParticleFrameRate { FPS_24, FPS_30, FPS_60, Unlimited }. Pooling: UIParticleMaterialPool, MaxPerKey = 32. Public API: Play, Stop, RestartPreview, SetMaterial, RefreshGlowMaterialAndRestart, IsPlaying.
GlowMeshPlayer GlowMeshPlayer.cs Playback: lifetime = 2f (Range(0.5, 5)), pauseBetweenCycles = 0.5f (Range(0, 3)), playbackSpeed = 1f (Range(0.1, 4)). Resolution: enum GlowResolution { RES_256, RES_512, RES_1024 }, default RES_512. Blit rate: enum BlitFrameRate { FPS_24, FPS_30, FPS_60, Unlimited }, default Unlimited. textureProperty = "_BaseMap". WarmUpBlits = 3. Pools: RenderTexturePool.MaxPerSize = 16, MaterialPool.MaxPerKey = 32. Public API: Play, Stop, SetNormalizedTime, SetGlowMaterial, RefreshGlowMaterialAndRestart, IsPlaying, HasCompletedCycle.
VfxController, ContinuousRotation, ReadOnlyAttribute VfxController.cs, ContinuousRotation.cs, ReadOnlyAttribute.cs VfxController: SpawnUniversalVfxEffect(GameObject, Vector3, bool autoCleanup = true), field globalVFXHolder. ContinuousRotation: rotationSpeed = 50f, axisX/axisY/axisZ booleans. ReadOnlyAttribute: ReadOnlyAttribute(bool onlyInPlayMode = false), drawer applies gray tint.
Editor tools TouchEffectPrefabWizard.cs, editor classes in each player file Menu path "Assets/Create/Procedural VFX Toolkit/Effect Prefab...", family prefix "UniversalProceduralVfx/", UI/World defaults (UI_Lifetime = 2f, UI_PauseBetweenCycles = 0.5f, UI_PlaybackSpeed = 0.5f, UI_RectSize = 120f, World_Lifetime = 2f, World_PauseBetweenCycles = 1f, World_PlaybackSpeed = 1f, World_Resolution = GlowResolution.RES_512), folder Assets/OctantaStudio/TouchEffectSystem/Prefabs/{EffectName}/, EnsureTransparentSettings. Health check: GlowMeshPlayerEditor.DrawDisplayMaterialHealthCheck and FixDisplayMaterial. Buttons: DrawDocumentationButton in ParticlePreviewPlayerEditor, GlowMeshPlayerEditor, TouchGlowUIEditor, SparkleSpawnerEditor, TouchTextUIEditor.
Shader library particle-shader-prompt.md Mandatory structure section (“Lifetime cycle”, “Transparent background”, “Effect stays inside the particle bounds”). System properties (_MainTex, _TimeNow, _StartTime, _Lifetime, _Scale, _RandomSeed) are declared in every sample. _OneTouchHoldAge, _HoldingForbidden, _UseMobileOptimization appear in the samples that use them. Blend modes: Blend One One vs Blend SrcAlpha OneMinusSrcAlpha. Nine sample HLSL files. The parameter ranges in the table are copied verbatim from each sample’s Properties block.
Effect prefabs ReadMe.txt, TouchEffectPrefabWizard.cs, GlowMeshPlayer.cs, ParticlePreviewPlayer.cs Folder layout from ReadMe.txt and the wizard. Display materials and their expected shaders from the wizard constants (UrpDisplayMaterialName, BuiltInDisplayMaterialName). PreviewEffect described in ReadMe.txt as “TouchEffects > PreviewEffect”.
Getting started ReadMe.txt The four steps of “Add UI visual input feedback in one minute”, the three steps of “Simply spawn a UI visual effect”, and the three steps of “Simply spawn a 3D visual effect” are reproduced as-is from ReadMe.txt.
Performance GlowMeshPlayer.cs, ParticlePreviewPlayer.cs, TouchGlowUI.cs, cleanup services Resolution table is the exact pixel counts of RES_256/512/1024. Blit rate: BlitFrameRate enum and its doc comment (“only helps effects whose visual content changes slowly”). UI frame rate: UIParticleFrameRate and its doc comment. Pools: RenderTexturePool.MaxPerSize = 16, MaterialPool.MaxPerKey = 32, UIParticleMaterialPool.MaxPerKey = 32. MATERIAL_UPDATE_INTERVAL = 1f / 30f, MIN_UPDATE_THRESHOLD = 0.01f. Cleanup interval: IntervalSeconds = 15f in both services. Warm-up: WarmUpBlits = 3.
Compatibility Input-driven and standalone visual effects. Built.txt, store listing, GlowMeshPlayer.cs, InputController.cs Unity version: store listing (“Developed using Unity 6000.0.42f1”) and store description (“Unity Version 6000.3.26f1 — Compatible”). Pipelines: store description. Platform support: store listing. No third-party libraries: store description. Pipeline detection: GlowMeshPlayer.cs. Input System conditional compilation: #if ENABLE_INPUT_SYSTEM in InputController.cs. Canvas render modes handled: switch (targetCanvas.renderMode) in TouchGlowUI.ConvertScreenToLocalPosition and the equivalents in the other UI players.
Glossary Same as above Each term is defined by the code path it points to in the glossary entry’s cross-reference.

About external links. The Asset Store link (https://u3d.as/3C7x), the GitBook documentation link, and the Unity Forum topic link were supplied by the asset owner. They are not derivable from the source code; they are included as published alongside the asset.

About two qualifiers that are not directly in the asset’s own source. First, the “(Ukraine)” in the Developer line comes from the studio’s other public materials; the source code and documentation files in this asset identify the studio as “Octanta Studio” only, through the Assets/OctantaStudio/… paths and the octanta-studio.gitbook.io URL. Second, the “50+ production-ready shaders” count is the store listing’s number; the particle-shader-prompt.md file documents nine of them as samples. The page reports both numbers with their sources so a reader can see which one covers what.

This page was created as a reference, primarily for machine reading and LLM-based search.

uk