Teleport VFX System Improvements
Overview
The teleport visual effects system was completely rewritten in February 2026 to use object pooling, TSL shaders, and multi-phase animations. The new system provides spectacular visual effects with zero allocations at spawn time and no pipeline compilation stutters.Visual Design
Multi-Phase Sequence
The teleport effect progresses through 4 distinct phases over 2.5 seconds: Phase 1: Gather (0.0s - 0.5s)- Ground rune circle fades in and scales up (0.5 → 2.0)
- Base glow disc pulses into existence
- Rune circle rotates at 2.0 rad/s
- Cyan color palette
- Dual beams shoot upward with elastic overshoot
- Core flash pops at beam base (white burst)
- Two shockwave rings expand outward (easeOutExpo)
- Point light intensity peaks at 5.0
- White-cyan color palette
- Beams hold at full height
- Helix spiral particles rise continuously
- Burst particles arc outward with gravity
- Sustained cyan glow
- All elements fade out with easeInQuad
- Beams thin and shrink
- Particles fade via scale reduction
- Return to dark
Visual Components
Ground Rune Circle:- Procedural canvas texture with concentric circles, radial spokes, and triangular glyphs
- Additive blending with cyan color
- Rotates continuously during effect
- Scale: 0.5 → 2.0 during gather phase
- Procedural radial glow texture
- Pulses at 6 Hz during sustain phase
- Cyan color with 0.8 opacity
- White → cyan vertical gradient
- Hermite elastic curve (overshoots to 1.3 at t=0.35, settles to 1.0)
- Scrolling energy pulse (4 Hz)
- Soft fade at base to prevent floor clipping
- Light cyan → dark blue gradient
- Delayed 0.03s after inner beam
- Slightly shorter and thinner
- Same elastic curve
- White sphere that pops at eruption (t=0.20-0.22s)
- Scale: 0 → 2.5 → 0
- Instant appearance, quick shrink
- Two expanding rings with staggered timing
- Ring 1: White-cyan, scale 1 → 13 over 0.2s
- Ring 2: Cyan, scale 1 → 11 over 0.22s (delayed 0.024s)
- easeOutExpo expansion curve
- Cyan color (#66ccff)
- Intensity: 0 → 1.5 (gather) → 5.0 (erupt) → 3.0 (sustain) → 0 (fade)
- Radius: 8 units
- Illuminates surrounding environment
- 2 counter-rotating strands × 6 particles each
- Rise speed: 2.5 + particleIndex * 0.25
- Spiral radius: 0.8 → 0.1 (tightens as they rise)
- Angular velocity: 3.0 + particleIndex * 0.4
- Recycle when reaching 16 units height
- Cyan and white-cyan colors
- 3 white + 3 cyan + 2 gold particles
- Random horizontal spread (1.0-3.0 units)
- Upward velocity: 4.0-9.0 units/s
- Gravity: 6.0 units/s²
- Fade via scale reduction
- Hide when below ground
Performance Optimizations
Object Pooling
Before (Old System):- Zero allocations at spawn time
- Zero garbage collection pressure
- No pipeline compilation stutters
- Instant effect spawning
TSL Shader Materials
Before: Basic materials with CPU-animated opacity After: TSL node materials with GPU-driven animations Rune Circle Material:- GPU-driven animations (zero CPU cost)
- Smooth gradients and pulses
- Per-effect opacity control via uniforms
- No material cloning needed
Shared Resources
Geometries (allocated once):- Particle plane:
PlaneGeometry(1, 1) - Inner beam cylinder:
CylinderGeometry(0.12, 0.25, 18, 12, 1, true) - Outer beam cylinder:
CylinderGeometry(0.06, 0.5, 16, 10, 1, true) - Disc:
CircleGeometry(0.5, 16) - Rune circle:
CircleGeometry(1.5, 32) - Shockwave ring:
RingGeometry(0.15, 0.4, 24) - Core flash sphere:
SphereGeometry(0.4, 8, 6)
- Rune circle canvas texture (256×256)
- Cyan particle glow material
- White particle glow material
- Rune circle material (with
uRuneOpacityuniform) - Base glow material (with
uGlowOpacityuniform) - Inner beam material (with
uInnerBeamOpacityuniform) - Outer beam material (with
uOuterBeamOpacityuniform) - Core flash material (with
uFlashOpacityuniform) - Shockwave ring 1 material (with
uShock1Opacityuniform) - Shockwave ring 2 material (with
uShock2Opacityuniform)
Suppressing Effects
Teleport effects can be suppressed for mid-fight proximity corrections:- Duel proximity corrections during combat
- Invisible position adjustments
- Anti-cheat teleports
- Debug teleports
suppressEffect: true→ No visual effect spawnedsuppressEffect: falseor omitted → Full visual effect
Easing Functions
easeOutQuad: Smooth decelerationDebugging
Enable Effect Logging
Inspect Pool State
Disable Pooling (Debug)
Temporarily disable pooling to test single-effect behavior:Verify Shader Compilation
Check for shader compilation errors:Migration from Old System
No migration needed - the new system is a drop-in replacement. Behavioral Changes:- Effect duration: 2.0s → 2.5s (more time to notice)
- Visual complexity: Simple beam + particles → Multi-phase sequence
- Performance: Allocates on spawn → Zero allocations (pooled)
- Same event trigger:
EventType.PLAYER_TELEPORTED - Same suppression mechanism:
suppressEffectflag - Same positioning: World-space coordinates
Related Documentation
- VFX Catalog Browser - Visual effect reference
- Arena Performance Optimizations - Related rendering improvements
- ClientTeleportEffectsSystem.ts - Implementation
- Curve.ts - Hermite curve implementation