Single Pass Instanced: VR Rendering Optimization and Configuration
Note: When a VR project on Unity transitions from Multi Pass to Single Pass Instanced, the first thing that breaks is custom shaders. The cause isn't bugs but expected behavior: shaders written for single-eye rendering don't account for stereo indices and matrices. Without proper adaptation, one eye sees artifacts while the other shows a blank screen. Our engineers with 10+ years of gamedev experience solve this comprehensively: audit, fix, and test on two devices. The result is stable 90+ FPS on Quest 3 without visual distortions.
Shader Failures on Enabling Single Pass Instanced
Enabling Single Pass Instanced in Project Settings → XR Plugin Management is a single checkbox. After that, shaders written without stereo instancing support stop working correctly. This isn't a configuration bug but expected behavior. In Single Pass Instanced, the shader receives a stereo index (unity_StereoEyeIndex) — 0 for the left eye, 1 for the right. Projection and view matrices are stored as arrays unity_StereoMatrixVP[2]. Shaders using only unity_MatrixVP render only one eye correctly — the second is either offset or shows the same frame.
Surface Shaders in Built-in RP are automatically compatible — Unity adds the necessary macros at compile time. Custom Vertex/Fragment shaders require manual use of macros UNITY_MATRIX_MVP, UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX, UNITY_TRANSFER_STEREO_EYE_INDEX. Missing any of these causes artifacts on one eye. In URP, most built-in shaders are already compatible, but custom render passes in ScriptableRendererFeature are often written without stereo support.
Diagnosing Problems with Single Pass Instanced
The first sign is artifacts strictly on one eye. In Frame Debugger, instead of a single draw call with [Instanced: 2], two separate calls appear. This means instancing hasn't been applied to the object. Causes: GPU Instancing disabled on the material, use of MaterialPropertyBlock with different data per instance, or exceeding the vertex limit for dynamic batching.
In URP with Forward Renderer, problems often arise with Post Processing. Effects like Depth of Field, Motion Blur, and Bloom don't support stereo directly — they are applied to a single render target and duplicated, causing visual shift. The solution is to use VR Mode in Post Processing Volume or write stereo-compatible shaders manually.
Pitfalls with Texture Atlases and UV
Single Pass Instanced uses Texture2DArray for render targets of both eyes. Shaders sampling _CameraDepthTexture or _CameraColorTexture must do so via SAMPLE_TEXTURE2D_ARRAY with layer index unity_StereoEyeIndex, not via SAMPLE_TEXTURE2D. Custom post-processing effects written for standard rendering often sample the depth as a 2D texture — in Single Pass Instanced, they get the depth of the left eye for both viewports. Visually: SSAO or outline works correctly for the left eye, but for the right eye it's offset or missing.
How to Check Shader Compatibility
Step-by-step procedure:
- Enable Single Pass Instanced in XR Plugin Management.
- Open Frame Debugger while the scene is running.
- Find the draw call for each object. If it's marked
[Instanced: 2]— the shader is compatible. - If instead there are two separate draw calls — the problem is in the shader or material.
- Visually check for artifacts: put on the headset and view the scene with both eyes.
Common errors in custom shaders
- Missing
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEXmacro in the vertex shader. - Using
TransformationMatrixMinstead ofUNITY_MATRIX_MVP. - Sampling a texture without considering
unity_StereoEyeIndexwhen working withTexture2DArray. - Applying post-processing effects incompatible with
VR Mode.
What Single Pass Instanced Delivers in Numbers
| Metric | Multi Pass | Single Pass Instanced | Improvement |
|---|---|---|---|
| CPU load per frame | 100% (base) | 40-60% | Up to 60% reduction |
| Draw calls per eye | ~2x separate | 1 instanced | 2x reduction |
| FPS in heavy scene (Quest 3) | 45 FPS | 72 FPS | +60% |
| GPU load | 100% | ~70% | 30% reduction |
Performance in practice: based on our measurements on Quest 3 with CPU-heavy scenes, Single Pass Instanced yields FPS gains from 15% to 40%. Comparison with Multi Pass: CPU load is 2-3 times lower (confirmed by Unity documentation).
What Our Work Includes
We handle the full transition cycle: audit of all shaders and render passes, fixing (adding stereo macros, adapting custom effects), configuring XR Plugin Management, post-processing and batching, and testing on two devices (Multi Pass baseline vs Single Pass Instanced) with profiler recording. We provide a change report and guarantee compatibility.
| Project size | Number of custom shaders | Estimated timeline |
|---|---|---|
| Small | up to 10 | 3–7 days |
| Medium | 10–30 | 1–3 weeks |
| Large (with post-processing and custom RP) | 30+ | 3–6 weeks |
Cost is calculated after a shader base audit and analysis of the current render pipeline. Contact us for a consultation — we will assess your project free of charge in one day.
Transition Process to Single Pass Instanced
Standard plan: enable SPI → compile list of shaders with errors → prioritize by visibility → fix them sequentially. Typically, 70–80% of shaders work without changes, 15–20% require adding stereo macros, and 5–10% need rewriting or replacement.
Testing is conducted in parallel on two headsets: one in Multi Pass (baseline), the other in Single Pass Instanced. We compare each scene visually and via profiler. We guarantee compatibility of all fixed shaders — if artifacts arise after deployment, we will rework them free of charge.
Contact us for a free audit of your project. Get a consultation right now — write to us, and we will propose an optimal transition plan considering your stack and deadlines.





