Skip to main content

Overview

Volumetric shaders create visible light beams and cones by rendering transparent meshes with sophisticated noise and gradient effects. These shaders are the most computationally intensive part of the VR Stage Lighting system and include multiple quality modes for performance optimization.

Shader Paths

DMX Control

  • VRSL/Standard Mover/Volumetric
  • VRSL/Wash Mover/Volumetric
  • VRSL/AudioLink/Standard Mover/Volumetric
  • VRSL/AudioLink/Wash Mover/Volumetric

Core Volumetric Properties

Quality Modes

bool
default:"false"
Enable high quality volumetric mode (experimental). Uses _NoiseTexHigh instead of _NoiseTex for better visual quality.
bool
default:"false"
Performance mode that disables noise sampling and extra texture reads. Significant performance boost at the cost of visual quality.
bool
default:"true"
Requires depth light to function. When disabled, volumetric will render without depth fade.

Textures

texture
default:"white"
Main light texture for the volumetric cone. Typically a radial gradient.
texture
default:"white"
Standard quality noise texture for volumetric distortion.
texture
default:"white"
High quality noise texture used when _HQMode is enabled.

Noise Configuration

bool
default:"true"
Enable high quality magic noise effect.
bool
default:"true"
Enable medium quality magic noise effect.
bool
default:"true"
Enable 2D noise texture sampling.
float
default:"1"
Base noise strength/intensity.
float
default:"0"
Random seed value for noise variation.

Magic Noise Settings

Magic noise creates dynamic, animated 3D noise patterns. Three quality presets are available:

High Quality Mode

float
default:"1"
Outside magic noise scale (high quality).
float
default:"1"
Inside magic noise scale (high quality).
float
default:"1"
Magic noise X axis scroll speed (high quality).
float
default:"1"
Magic noise Y axis scroll speed (high quality).
float
default:"1"
Magic noise Z axis scroll speed (high quality).
float
default:"1"
Magic noise strength (high quality).

Default Mode

float
default:"1"
Outside magic noise scale (default quality).
float
default:"1"
Inside magic noise scale (default quality).
float
default:"1"
Magic noise X scroll (default quality).
float
default:"1"
Magic noise Y scroll (default quality).
float
default:"1"
Magic noise Z scroll (default quality).
float
default:"1"
Magic noise strength (default quality).

Potato Mode

float
default:"1"
Outside magic noise scale (potato quality - typically unused).
float
default:"1"
Inside magic noise scale (potato quality - typically unused).
float
default:"1"
Magic noise X scroll (potato quality).
float
default:"1"
Magic noise Y scroll (potato quality).
float
default:"1"
Magic noise Z scroll (potato quality).
float
default:"1"
Magic noise strength (potato quality).

Intensity and Fade

float
default:"1"
Maximum cone intensity. Higher values create brighter, more visible volumetric beams.
float
default:"1"
Edge fade strength. Controls how sharply the cone edges fade out.
float
default:"0"
Inner fade strength. Creates a hollow cone effect when increased.
float
default:"1"
Curve for inner intensity falloff.
float
default:"0.1"
Distance-based fade. Cone fades at distance.
float
default:"0.1"
Depth blending amount. Controls soft particle intersection with geometry.

Blinding Effect

float
default:"1"
Strength of the blinding/bloom effect when looking into the light.
float
default:"1"
Angle modifier for blinding effect. Adjusts viewing angle sensitivity.

Gradient Controls

float
default:"2.25"
Gradient modifier for solid beams (no GOBO).
float
default:"2.25"
Gradient modifier when GOBO is active.

GOBO Beam Splitting

Creates stripe effects in the volumetric cone for different GOBO patterns:
bool
default:"false"
Enable beam splitting for GOBOs 2-8.
float
default:"0"
Stripe split frequency for GOBO 2.
float
default:"0"
Stripe split intensity for GOBO 2.
float
default:"0"
Stripe split frequency for GOBO 3.
float
default:"0"
Stripe split intensity for GOBO 3.
float
default:"0"
Stripe split frequency for GOBO 4.
float
default:"0"
Stripe split intensity for GOBO 4.
float
default:"0"
Stripe split frequency for GOBO 5.
float
default:"0"
Stripe split intensity for GOBO 5.
float
default:"0"
Stripe split frequency for GOBO 6.
float
default:"0"
Stripe split intensity for GOBO 6.
float
default:"0"
Stripe split frequency for GOBO 7.
float
default:"0"
Stripe split intensity for GOBO 7.
float
default:"0"
Stripe split frequency for GOBO 8.
float
default:"0"
Stripe split intensity for GOBO 8.

Animation

float
default:"0"
Speed of intensity pulse animation.

Rendering Properties

enum
default:"1"
Volumetric rendering mode:
  • 0: HQTransparent - Best quality, most expensive
  • 1: Transparent - Standard transparency
  • 2: AlphaToCoverage - MSAA-based transparency
enum
default:"1"
Destination blend mode. Typically set to One for additive blending.
enum
default:"0"
Blend operation.
bool
default:"false"
Depth buffer writing. Always false for volumetrics.
bool
default:"false"
Enable alpha to coverage mode.

Performance Optimization

Quality Levels

High Quality - Best visuals, lowest performance:
Standard Quality - Balanced:
Performance Mode - Best performance:

Shader Variants

The volumetric shader compiles multiple variants:
  • _MAGIC_NOISE_ON_HIGH - High quality noise
  • _MAGIC_NOISE_ON_MED - Medium quality noise
  • _USE_DEPTH_LIGHT - Depth-based effects
  • _POTATO_MODE_ON - Performance mode
  • _HQ_MODE - High quality mode
  • _2D_NOISE_ON - 2D noise sampling
  • _ALPHATEST_ON - Alpha testing
Total possible combinations: 128 variants

Optimization Tips

  1. Reduce Cone Length: Shorter cones have less overdraw
    • Use _ConeLength and _MaxConeLength conservatively
  2. Simplify Noise: Disable unused noise features
    • Turn off _MAGIC_NOISE_ON_HIGH if not needed
    • Use _PotatoMode on low-end hardware
  3. Limit Fixture Count: Volumetrics are expensive
    • Consider using fewer fixtures with higher intensity
    • Disable volumetrics for background/ambient lights
  4. Adjust Fade Settings: Reduce visibility distance
    • Lower _DistFade for shorter render distance
    • Increase _FadeStrength for sharper edges (less translucency layers)
  5. Use Lower Resolution: If using render textures
    • Render volumetrics to lower resolution RT
    • Upscale for final composite

Technical Details

Vertex Shader Calculations

The vertex shader pre-calculates:
  • Blinding effect based on view angle
  • Camera angle and fade
  • Stripe/split information
  • Cone width
  • World direction for depth correction
  • Intensity, strobe, GOBO selection, and spin speed
  • RGB color values

Fragment Shader Operations

The fragment shader performs:
  • Multi-layer noise sampling (2D + 3D magic noise)
  • Depth texture reading for soft particles
  • UV-based gradient calculations
  • GOBO stripe splitting
  • Edge fade calculations
  • Color blending and saturation
  • Mirror depth correction

Performance Characteristics

Vertex Shader: Lightweight
  • Simple position transforms
  • Minimal branching
  • Instanced property access
Fragment Shader: Heavy
  • Up to 3 texture samples per pixel (in HQ mode):
    • _LightMainTex
    • _NoiseTex or _NoiseTexHigh
    • _CameraDepthTexture
  • Complex noise calculations
  • Distance-based fade calculations
  • High overdraw on large cones

Depth Fade Implementation

Soft particle intersection uses depth comparison:
This creates smooth transitions where volumetric cones intersect geometry.
float
default:"1"
Multiplier for render texture intensity when using AudioLink.
bool
default:"false"
Use traditional texture sampling instead of AudioLink-specific sampling.
float
default:"1"
Intersection modification for AudioLink mode.

See Also