Overview
VRSL is designed for high performance through GPU-accelerated shaders and batching, but optimization is still crucial for complex scenes. This guide covers techniques to maximize frame rate while maintaining visual quality.VRSL is 95% shader-based, meaning most computation happens on the GPU. Focus optimization efforts on GPU load, draw calls, and fill rate.
Performance Architecture
VRSL achieves high performance through:- GPU Instancing: Multiple fixtures share the same shader
- Custom Render Textures: Preprocessing DMX/AudioLink data once
- Shader-based Computation: No CPU overhead for lighting calculations
- Batching: Reduces draw calls dramatically
- No Real-time Unity Lights: Avoids expensive lighting calculations
Performance Budget Guidelines
Target Performance Metrics
PC VR (Good):- 90 FPS constant
- 50-100 VRSL fixtures
- High volumetric quality
- 3D noise enabled
- 72 FPS constant
- 100-150 VRSL fixtures
- Medium volumetric quality
- 2D noise only
- 60-90 FPS
- 150+ VRSL fixtures
- High quality settings
- 72 FPS constant
- 20-30 fixtures maximum
- Low volumetric quality
- Depth light disabled
- 3D noise disabled
VRSL Control Panel Optimization
Quality Modes
The VRSL Local UI Control Panel provides multiple quality settings:Volumetric Quality
High Quality:- Transparent rendering
- Full alpha blending
- Highest visual quality
- Most expensive (render queue 3002)
- Transparent rendering
- Optimized blending
- Good visual quality
- Moderate cost (render queue 3002)
- Alpha-to-coverage
- Opaque rendering
- Acceptable quality
- Lowest cost (render queue 2452)
Projection Quality
High:- Transparent blending
- Smooth edges
- Render queue 3001
- Alpha-to-coverage
- Sharper edges
- Render queue 2451
- Blinder projections
- PAR projections
- Other projections
Additional Quality Settings
Disco Ball Quality:- High: Transparent, smooth
- Low: Opaque, faster
- High: Full effects
- Low: Simplified
Depth Light Toggle
Require Depth Light:- Enabled: Uses depth texture for volumetric lighting (better quality)
- Disabled: No depth dependency (Quest compatible, better performance)
Volumetric Noise Toggle
3D Noise:- Creates realistic volumetric texture
- Expensive on GPU
- Can be disabled for major performance gain
- Fallback when 3D disabled
- Much cheaper
- Still acceptable quality
Volumetric Mesh Quality
Available in VRSL 2.6.0+:- Open VRSL Control Panel
- Navigate to volumetric mesh quality settings
-
Switch between mesh quality levels:
- High: Full polygon count
- Medium: Reduced polygon count
- Low: Minimal polygon count
- Apply globally to all fixtures in scene
Lower poly meshes reduce GPU load with minimal visual impact from normal viewing distances.
Fixture Optimization Strategies
Fixture Count Guidelines
Per Universe:- Maximum 50 fixtures for best performance
- Can go higher with optimization
- Consider visual impact vs. count
- PC VR: 50-150 fixtures
- PC Desktop: 150-300 fixtures
- Quest: 20-30 fixtures maximum
Component-Based Intensity Control
Use Final Intensity Component Mode (VRSL 2.6.2+) to disable unneeded components:- Enable Component Mode on fixtures
- Set unused component intensities to 0
- Reduce draw calls significantly
Fixture Placement
Optimize visibility:- Remove fixtures not visible to players
- Use stencil masks to hide lights in unused areas
- Consider player’s typical viewing angles
- Don’t place fixtures behind walls/ceilings
- Fewer, well-placed fixtures > many random ones
- Use wash lights for large areas
- Use spots for accents and focus
- Create depth with layers, not quantity
Shader and Material Optimization
GPU Instancing
VRSL uses GPU instancing automatically:- Fixtures with same material instance together
- Dramatically reduces draw calls
- Already optimized by VRSL
- Use VRSL’s material generation tool
- Don’t break prefab connections unnecessarily
- Keep materials shared where possible
Custom Render Texture Settings
Optimize CRT update rates:- Select Control Panel in scene
- Set
_targetCRTUpdateRateto 0.0 (default) - For slower systems, can increase to 0.1 or higher
- Update Period controls refresh rate
- Lower = faster updates, more GPU load
- Higher = slower updates, less GPU load
- 0.0 = every frame (default)
Material Property Blocks
VRSL uses MaterialPropertyBlocks for per-fixture properties:- Maintains GPU instancing
- Efficient property updates
- Already optimized by VRSL scripts
- Modifying materials directly instead of using VRSL scripts
- Creating unique material instances per fixture
- Changing shared material properties
Depth Light Optimization
The depth light enables volumetric lighting depth effects:Adding Depth Light
- In VRSL Control Panel, click “Spawn Depth Light”
- Directional light with shadows appears
- Position anywhere (direction matters, not position)
- Adjust shadow settings:
Quest Compatibility
For Quest builds:- Open VRSL Control Panel
- Set
RequireDepthLight = false - Either remove depth light or disable shadows
- Reduces GPU load significantly
DMX-Specific Optimization
Interpolation Settings
Interpolation smooths DMX data but adds slight overhead:- Access via Control Panel > CRT Materials
- Select Movement Interpolation material
- Adjust smoothing:
- Maximum smoothing (0): Best quality, most processing
- Minimum smoothing (1): Fast movement, less processing
- VRSL automatically reduces interpolation in-game
- Configurable via
inGameInterpolationModifier - Default 1.55x reduction
- Improves performance without sacrificing quality
Extended Universes
Using 9-universe mode vs. single universe:- More universes = larger textures = more VRAM
- Only enable if you need >512 channels
- Disable if using single universe for slight performance gain
DMX Mode Selection
Performance comparison:- Horizontal: Standard (recommended)
- Vertical: Equivalent to Horizontal
- Legacy: Slightly less efficient
AudioLink Optimization
AudioLink CRT
AudioLink uses interpolation CRT:- Minimal overhead
- Shared across all AudioLink fixtures
- Pre-processes frequency data once
- Reduce AudioLink resolution if needed (in AudioLink prefab)
- Disable AudioLink when not playing music
- Use lower delay values (faster updates)
Fixture Count
AudioLink fixtures are slightly cheaper than DMX:- No video decoding overhead
- Simpler data structure
- Can have 10-20% more fixtures vs. DMX
Band Assignment
No performance difference between bands:- Choose bands for artistic reasons
- All bands computed simultaneously
Scene-Wide Optimization
Occlusion Culling
Set up occlusion culling for your world:- Window > Rendering > Occlusion Culling
- Bake occlusion data
- VRSL fixtures will be culled when not visible
- Major performance improvement in large venues
LOD Groups
For complex fixture models:- Create LOD groups on fixture prefabs
- Add lower-poly versions at distances
- Reduces vertex processing for distant fixtures
- LOD 0 (0-10m): Full detail
- LOD 1 (10-25m): 50% polygons
- LOD 2 (25m+): 25% polygons
Stencil Masks
Prevent lights rendering in unused areas:- Spawn stencil masks from Control Panel:
- Cube Mask
- Cylinder Mask
- Capsule Mask
- Sphere Mask
- Place in doorways, hallways, etc.
- Lights won’t render through masks
- Saves fill rate and processing
- Prevent light leaking between rooms
- Reduce overdraw in complex geometry
- Focus GPU power on visible areas
Post-Processing Optimization
Bloom Settings
Bloom enhances VRSL but has performance cost: Optimized Bloom Settings:- Enable Fast Mode
- Reduce Diffusion (number of passes)
- Increase Threshold (less pixels affected)
- Let users control via Local UI Panel
Other Post-Processing
Minimize other expensive effects:- Avoid: Screen Space Reflections (very expensive)
- Avoid: Ambient Occlusion (expensive)
- Use: Color Grading (cheap)
- Use: Vignette (cheap)
- Use: Bloom (moderate, optimized)
Quest Optimization Checklist
Monitoring Performance
Unity Editor
Stats Panel:- FPS: Target 90+ for VR, 60+ for desktop
- Batches: Lower is better (instancing helps)
- Tris: Monitor total triangles
- SetPass calls: Draw call overhead
- Window > Analysis > Profiler
- Enter Play Mode
- Monitor:
- GPU: Shader time, fill rate
- Rendering: Draw calls, batches
- Memory: Texture memory, mesh memory
VRChat In-World
Performance Rank:- Check your world’s performance rank
- Aim for “Good” or “Medium”
- “Very Poor” will limit audience
- Enable in VRChat settings
- Monitor during testing
- Test with multiple users
- Check before upload
- Review warnings and errors
- Address “Very Poor” ratings
Optimization Workflow
Medium Impact:
6. Use low-poly volumetric meshes
7. Optimize post-processing
8. Add occlusion culling
9. Use stencil masks
10. Reduce projection quality
10. Reduce projection quality
Common Performance Issues
Low FPS with Few Fixtures
Check:- Volumetric quality too high
- 3D noise enabled on many fixtures
- Depth shadows too high resolution
- Post-processing too aggressive
- Other scene elements (not VRSL)
- Lower volumetric quality to Medium or Low
- Disable 3D noise
- Reduce shadow resolution
- Optimize bloom settings
High Draw Calls
Check:- Too many unique materials
- Broken GPU instancing
- Too many different fixture types
- Use VRSL material generation tool
- Consolidate fixture types
- Ensure materials are shared
- Check instancing is working
Memory Issues
Check:- Too many high-res projection textures
- Large DMX render textures (9-universe mode)
- High-poly volumetric meshes
- Reduce projection texture resolution
- Disable extended universes if not needed
- Use lower-poly volumetric meshes
- Remove unused assets
Best Practices Summary
Development Workflow:- Profile early and often
- Optimize before adding more features
- Test in VRChat regularly (editor performance differs)
- Document what works for your hardware targets
- Plan for lowest common denominator
- High visual quality isn’t worth excluding users
- Medium quality VRSL still looks excellent
- Most users won’t notice optimizations
- Smooth frame rate > maximum quality
- Make quality adjustable for users
Next Steps
- Set up DMX Control
- Configure AudioLink
- Learn about Video Streaming
- Create Custom Fixtures
Resources
- Unity Optimization Manual
- VRChat World Optimization
- VRSL Discord - Performance help from community