-
Notifications
You must be signed in to change notification settings - Fork 36
Installation and Setup
How to install Mochie's Shaders and set up your project.
- Download the latest Free Shader Package (
Mochies.Unity.Shaders.vX.Free.unitypackage) from the Releases page. - In Unity, select Assets > Import Package > Custom Package...
- Select the downloaded package and import everything.
The shaders install to Assets/Mochie.
Patron-only shaders and packages are distributed only through Patreon, and follow the same setup process as the free package.
Some features read the camera depth texture:
- Screen Space Reflections in Standard, Glass, Splat Mapping π, Uber, and Water
- Water: Foam, edge fade, depth fog, and caustics
- Underwater Visuals: Blur, caustics, and fog
- Particles: Softening
- Screen FX: Depth of field, triplanar distortion, and several Screen FX X π effects
- Corruption π and Blindness π
Unity only generates a depth texture when something requests it. In VRChat you can't add scripts to cameras, so the included Depth Light prefab (Assets/Mochie/Unity/Prefabs) handles it. It's a directional light with near-zero intensity and shadows enabled, which makes Unity render the depth texture. Any directional light with shadows enabled has the same effect.
- Worlds: Place a Depth Light in the scene if no directional light with shadows is present.
- Avatars: Parent a Depth Light anywhere on the avatar. Its position doesn't matter.
The inspectors set the render queue automatically from the blending mode:
| Blending | Queue |
|---|---|
| Opaque |
2000 (Geometry) |
| Cutout |
2450 (AlphaTest) |
| Fade / Transparent / Grabpass |
3000 (Transparent) |
-
Screen Space Reflections and refraction need to render after opaque geometry. For example, Standard moves opaque materials with SSR to queue
2501, and Uber's SSR and refraction require a queue of2501or higher. - Render Queue Offset: Most inspectors (Standard, Glass, Water, Particles, Taken π) have an offset field that adds to or subtracts from the queue above.
The package includes these editor utilities. See Utilities for full details.
- Global Standard Settings: Applies specularity, lightmapping, filtering, and AreaLit settings to many Standard materials at once, and swaps materials between Standard variants.
- Texture Packer: The Pack Textures button in the inspectors packs separate PBR maps into one packed texture.
- Convert to Flipbook Asset: Converts a GIF into a texture array flipbook.
- Create Material: Creates a new material that uses Standard, Standard Lite, or Standard Mobile.
- Material Upgrader: Moves materials made with older versions of Standard or Standard Lite to the current version.
Mochie's Shaders β’ Created by Mochie β’ GitHub β’ Found an issue? Submit a report