Create and Optimize Mirrors for VRChat Worlds
VRChat worlds use the SDK's VRC Mirror Reflection component. It renders the scene from the correct reflected viewpoint and writes the result to the _MainTex property of the first material on the same GameObject's Mesh Renderer.
For a standard VRChat mirror, use this component or the SDK's included mirror prefab instead of building a separate Unity Camera and Render Texture system.
Start with the VRChat SDK prefab, position its mirror surface, and test its existing interaction before changing quality settings.
- Find VRCMirror in the VRChat Worlds SDK sample prefabs.
- Drag the prefab into the scene and position its reflective surface.
- Use VRChat Build & Test, then reduce reflected layers or resolution if the mirror costs too much performance.
VRChat states that mirrors can drastically reduce a world's frame rate. Keep mirrors off until requested or until a user approaches, limit the reflected layers, and reduce mirror resolution when necessary.
Use the Included VRCMirror Prefab
The Worlds SDK includes a working mirror example. In the Project window, browse to:
Packages > VRChat SDK - Worlds > Samples > UdonExampleScene > Prefabs > VRCMirror
Drag the prefab into the Hierarchy. The included example demonstrates the component, material, and Udon interaction together, which avoids several common manual-setup errors.
If the sample is not visible:
- Confirm the project was created or managed with VRChat Creator Companion.
- Open Creator Companion and select Manage Project.
- Confirm VRChat SDK - Worlds is installed.
- Reopen Unity and allow Package Manager and script compilation to finish.
- Search the Project window for
VRCMirror.
Do not copy the prefab from another project with an unknown or incompatible SDK version.
Position the Mirror
Select the mirror's visible surface and position it like any other scene object.
- Keep the surface planar.
- Face its visible side toward the area where players will stand.
- Avoid non-uniform or negative scale when the prefab can be resized through its normal parent or mesh dimensions.
- Leave enough standing space for players without placing the mirror directly across a required route.
- Check that nearby buttons remain reachable in desktop and VR modes.
Test the mirror from the intended viewing area rather than only from Unity's Scene view.
Build a Mirror Manually
Use the prefab unless the world needs a custom mesh or material. For a manual setup:
- Create or select a flat GameObject for the mirror surface.
- Confirm it has a Mesh Filter and Mesh Renderer.
- Assign a material whose shader exposes a
_MainTexproperty. - Add VRC Mirror Reflection to the same GameObject as the Mesh Renderer.
- Put the mirror surface on the SDK-compatible layer used by the prefab, normally Water.
- Configure Reflect Layers, resolution, and lighting options.
- Test with VRChat Build & Test.
VRC_MirrorReflection writes to the first material slot on the Mesh Renderer. If the reflective material is in another slot, reorder the materials or separate the mirror surface into its own renderer.
The Water layer is never rendered in mirrors. Keeping the reflective surface on that layer prevents mirror surfaces and other Water-layer objects from being included in the reflected image.
VRC Mirror Reflection Settings
| Setting | What it controls | When to change it |
|---|---|---|
| Disable Pixel Lights | Makes real-time point and spot pixel lights fall back to vertex lighting in the mirror | Enable when those lights are not visually essential in the reflection |
| Turn Off Mirror Occlusion | Disables occlusion culling for the mirror render | Enable when reflected objects flicker or disappear incorrectly |
| Reflect Layers | Selects which Unity layers the mirror renders | Exclude layers that do not need to appear |
| Mirror Resolution | Sets the reflection resolution per eye in VR | Reduce it when the mirror has excessive GPU cost |
| Maximum Antialiasing | Limits MSAA for the mirror image | Lower it when the visual improvement does not justify the cost |
| Custom Shader | Replaces VRChat's default mirror shader | Use only when the shader is built and tested for this component |
| Camera Clear Flags | Controls how the reflection background is cleared | Change for a custom skybox, solid color, or shader effect |
| Custom Skybox | Supplies the mirror skybox when custom-skybox clearing is selected | Assign only with the matching clear mode |
| Custom Clear Color | Supplies the background color and alpha for solid-color clearing | Use with the matching clear mode or a compatible custom shader |
The user's VRChat graphics settings can override the mirror's maximum antialiasing. The Auto mirror resolution follows the user's display or headset resolution up to the documented maximum of 2048 × 2048 per eye.
Configure Reflect Layers
Every enabled layer adds objects that may be drawn again in the mirror. Begin with the layers the mirror actually needs.
Common decisions include:
- Include environment layers needed to understand the reflected room.
- Include layers required for players and avatars.
- Exclude hidden helpers, distant decorations, particles, or effects that add little to the reflected view.
- Keep the mirror surface on Water, which VRChat never renders in mirrors.
- Do not rename or repurpose VRChat's built-in layers.
VRChat uses layer 18, MirrorReflection, to render the local player in mirrors. Renderers placed on this layer appear only in mirrors and are not drawn by VRChat's main camera. Treat it as a VRChat-managed layer rather than a general environment layer.
See Unity Layers in VRChat before changing layer assignments or masks.
Add a User Toggle
An optional mirror should not need to render continuously.
The SDK's Udon Example Scene includes a MirrorSystem example. Its toggle program changes the active state of a child VRCMirror object. You can use the included prefab as a reference for:
- a nearby Interact button
- a mirror GameObject that begins inactive
- a local enable or disable action
Use a local toggle when mirror state is a personal graphics choice. A synced toggle makes one user's choice change the mirror for everyone and adds networking that a personal performance control does not require.
If the world offers more than one quality level, configure separate mirror objects or settings deliberately and ensure only the selected mirror is active.
Choose Practical Quality Settings
There is no universal resolution or layer mask that suits every world. Measure the actual scene.
- Begin with one mirror.
- Keep it disabled by default.
- Limit Reflect Layers to the required content.
- Enable Disable Pixel Lights if the reflected lighting remains acceptable.
- Test the default resolution.
- Reduce resolution or antialiasing if the mirror causes an unacceptable frame-time increase.
- Repeat the test with representative avatars and scene effects visible.
Large mirror surfaces do not directly change the number of rendered pixels in the mirror texture, but they make the reflected result more prominent and may encourage more players to gather within view. Test the intended room use, not only an empty scene.
Occlusion and Reflected Flicker
Occlusion culling can reduce work by skipping objects Unity considers hidden. A mirror sees the scene from a reflected viewpoint, so existing occlusion data can sometimes make objects flicker or disappear in the reflection.
If this happens:
- Confirm the object is included in Reflect Layers.
- Check whether the object renders correctly outside the mirror.
- Enable Turn Off Mirror Occlusion on the mirror.
- Repeat the test from several positions.
- Compare the performance cost before keeping the option enabled.
Do not disable mirror occlusion as a first response to every missing object. A layer mask, renderer state, shader, or distance setting may be the actual cause.
Custom Materials and Shaders
A manual mirror material must expose _MainTex, because that is where VRC_MirrorReflection writes its rendered image.
Before using a custom shader:
- verify that
_MainTexis the intended mirror texture property - check UV orientation on the mirror mesh
- test stereo rendering in VR
- test fog, skybox, transparency, and color handling
- provide a simpler fallback when the custom effect is optional
The SDK prefab's material is the reliable baseline. Compare the custom result against it when diagnosing a blank, flipped, or incorrectly cleared mirror.
Test the Mirror in VRChat
Use Unity Play Mode or ClientSim for interaction logic, then perform VRChat Build & Test for the reflection itself.
Check:
- the local player and intended avatars appear
- the mirror faces the correct direction
- reflected environment layers are correct
- excluded helpers and effects remain hidden
- the toggle works in desktop and VR interaction modes
- the mirror begins in the intended active state
- no objects flicker when moving near the mirror
- the selected resolution and antialiasing look acceptable
- performance is measured with the mirror both disabled and enabled
Repeat the test after changing lighting, occlusion data, layers, shaders, or major environment geometry.
Mirror Completion Checklist
- The object uses VRC Mirror Reflection, not a standalone camera-based imitation.
- A Mesh Renderer is present on the same GameObject.
- The reflective material occupies the first material slot and supports
_MainTex. - The mirror surface uses the intended SDK-compatible layer.
- Reflect Layers includes only required content.
- Pixel lights, resolution, and antialiasing have been evaluated.
- Reflected objects do not flicker with the chosen occlusion setting.
- An optional mirror has a clear local toggle.
- VRChat Build & Test passes in desktop and, where relevant, VR.
- Enabled and disabled performance have been compared.
Troubleshooting
The mirror is blank in VRChat
Confirm that VRC Mirror Reflection and the Mesh Renderer are on the same GameObject. Check that the first material has a `_MainTex` property, then compare the setup with the SDK's VRCMirror prefab.
The mirror works, but the local player is missing
Check the mirror's Reflect Layers and confirm the VRChat-managed MirrorReflection layer has not been renamed or removed. Recreate damaged built-in layer settings through a clean Creator Companion Worlds project if necessary.
Environment objects are missing from the reflection
Check each object's Unity layer against Reflect Layers. Remember that Water-layer objects are never rendered in mirrors. If the mask is correct but objects flicker, test Turn Off Mirror Occlusion.
Objects flicker or disappear while I move
Enable Turn Off Mirror Occlusion and retest from several positions. If that fixes the reflection, evaluate the performance cost and review the scene's occlusion-culling setup.
The mirror causes a large frame-rate drop
Keep it inactive by default, exclude unnecessary layers, enable Disable Pixel Lights where acceptable, and reduce mirror resolution or antialiasing. Measure again with representative avatars and effects visible.
The custom mirror material is black, flipped, or distorted
Verify that the shader exposes `_MainTex`, the reflective material is first on the Mesh Renderer, and the mesh UVs face the expected direction. Restore the SDK prefab material to separate a shader problem from a component problem.
Continue Learning
- Unity Layers and Tags for VRChat Worlds
- Unity Layers in VRChat
- Measure and Improve VRChat World Performance
- Simple Occlusion Culling
- VRChat World Optimization Checklist
- VRChat World Creation Guide
Official References
- VRChat: VRC Mirror Reflection
- VRChat: SDK Prefabs
- VRChat: Udon Example Scene
- VRChat: Unity Layers in VRChat
- VRChat: Scene Components
- VRChat: Allowlisted World Components
- VRChat: ClientSim
Next Step
Continue with Measure and Improve VRChat World Performance and compare frame timing with the mirror disabled and enabled.