Skip to main content

Depth Effects

This page is for anyone turning on Depth Effects for the first time. It draws bang shadows and even outlines from screen depth. It takes about 10 minutes.

What is this​

The depth texture is the camera's measurement of what is how far in front. Five effects drawn from that information live in the Screen-space Effects group.

Inspector sectionWhat it draws
Depth Rim LightA light line of even thickness along the whole silhouette
Depth ShadowThe shadow bangs cast on the forehead
SSAO (Screen Space Occlusion)Contact shading in folds and where surfaces meet
SSSSS (Experimental)Light bleeding through hair tips and hems
Inner OutlineInner Depth Edge. Boundary lines inside the silhouette, such as collars and chins

When to use it​

  • When you want bang shadows to stay steady even as the lighting changes.
  • When you want contact shading where clothing meets the body.
Check depth before touching any value

Without depth, raising width or intensity puts nothing on screen. The inspector tells you directly what is missing at that point.

Secure depth first​

EnvironmentWhat to do
VRChatTurn on the Photo Camera, or have the world enable Screen Camera depth. Check that Manager's Remove depth light on build is off
General Unity (BRP)The MingToon Manager in the scene supplies it automatically in the editor. There is no component to add
URP 12Run StudioRaming > MingToon > URP > Install Depth Effects Renderer Feature
WarudoYou need a Warudo camera with Depth on

On URP you must also enable Depth Texture on the Renderer Data you use. An avatar cannot force depth on the ordinary VRChat player screen. So lay a floor with Rim and Outline.

Depth availability​

Depth Availability decides how the presence of depth is judged.

  • Auto is the default. The shader finds it on its own, so leave it here.
  • Force On lets the author vouch for hosts the automatic check cannot reach.
  • Force Off blocks depth effects completely.
  • Diagnostic paints the decision state in color. It is for bug reports.
Force On does not enable mirrors

A mirror camera does not draw its own depth, yet someone else's depth buffer is attached. Reading it as is makes the character use someone else's silhouette as its own shadow.

Diagnostic: for reports only​

It paints which depth the shader was looking at in solid colors. The whole look changes. Black is no depth, red is not this screen's buffer, and yellow is normal.

Diagnostic colors compared on a screen without depth and a screen with depth

Try it in 30 seconds​

  1. Select a converted face material.
  2. Turn on Depth Effects.
  3. Check that Master Width is 1.
  4. Turn on Depth Shadow.

You succeeded when a bang shadow appears on the forehead. If nothing changes, go to Troubleshooting.

The depth effects master​

The switch that turns all five modules on and off, plus their shared values, live here.

Inspector labelWhat it changesSuggested starting valueRaise it / lower it
Depth EffectsThe master switch of all five modulesOnOff turns all five modules off
Master WidthThe shared multiplier of Depth Rim Light and Depth ShadowLeave at the default (1)At 0, raising each module's width shows nothing
Master BiasThe smallest depth difference accepted as a front-back boundaryLeave at the default (0.02)Lowering it attaches lines to shallow curvature and looks messy
Master SoftnessThe transition width of the depth boundary decisionLeave at the default (0.08)Lowering it gives a hard ink line, and raising it gives a bled boundary
Width ModeWhat the thickness is measured againstLeave at the default (Distance Stable)Screen Pixels thickens the line as you move away

Depth Rim Light​

It draws a light line of even thickness outside the silhouette.

  1. Check that Depth Effects is on.
  2. Turn on Depth Rim Light.
  3. Set Rim Intensity to 1.
  4. Set Rim Width Multiplier to 2.

You succeeded when an even line of light follows the silhouette.

A silhouette with Depth Rim Light off next to one with it on

Inspector labelWhat it changesSuggested starting valueRaise it / lower it
Rim IntensityThe brightness multiplier of the lineLeave at the default (1)At 0, changing color and width shows nothing
Rim Width MultiplierThe dedicated multiplier applied to Master WidthLeave at the default (2)If Master Width is 0, raising this is useless
360 RimWhether it wraps the whole silhouette1At 0 it appears only on the light side, and at 1 it wraps everything
Scene Light InfluenceHow closely it follows the scene brightness0.3At 0 the line stays even in dark worlds
Rim Sample QualityHow many depth samples are read per pixelLeave at the default (Standard)Low catches eyes, nose, and mouth as rim too

Depth Shadow​

It pushes the silhouette of the object in front away from the light to draw a shadow band.

  1. Turn on Depth Shadow on the face material.
  2. Set Shadow Width to 3.
  3. Set Shadow Intensity to 1.
  4. Set Depth Shadow Bias to 0.03.

You succeeded when a bang-shaped shadow appears on the forehead.

A forehead with Depth Shadow off next to one with it on

Inspector labelWhat it changesSuggested starting valueRaise it / lower it
Shadow WidthThe thickness of the pushed bandLeave at the default (3)Raising it stretches below the forehead, and lowering it sticks to the mesh
Shadow IntensityThe final amount of shadow appliedLeave at the default (1)At 0, raising the width shows nothing
Depth Shadow BiasThe smallest gap between the front object and the receiving surfaceLeave at the default (0.03)0.03 is 3 mm. Lowering it sticks the shadow to the face
Depth StretchHow much the shadow widens with the floating distanceLeave at the default (0.75)At 0, width alone decides the shadow
Depth FalloffHow much further parts fade outLeave at the default (0.5)At 1 the furthest shadow disappears completely
SoftnessThe width over which the boundary becomes full shadowLeave at the default (0.05)Lowering it snaps, and raising it fades shallow contacts
Depth CurveThe curve shared by width, blur, and falloffLeave at the default (0)At 0 it is proportional to depth, and raising it changes only the far side

Sticking and falloff​

If the shadow sticks to its own face, raise Depth Shadow Bias. If it still remains, raise Receiver Depth Pushback on the face material. It sits right below the bias. Use it only on receiving materials such as face and body, and leave hair and clothing at 0.

A Receiver Depth Pushback above 0 blocks projected shadows

The projected shadows that material receives are turned off automatically. Turning Depth Shadow off or returning the value to 0 restores the original settings.

SSSSS (Experimental)​

It makes thin parts look as though they hold light. It is still experimental.

  1. Turn on Enable Translucency on the hair material.
  2. Set Translucency Intensity to 1.
  3. Set Measure Width to 6.
  4. Move the light behind the character.

You succeeded when the hair tips glow red.

Hair tips in backlight with translucency off next to the same tips with it on

Inspector labelWhat it changesSuggested starting valueRaise it / lower it
Translucency IntensityThe brightness multiplier of the whole translucencyLeave at the default (1)At 0 the calculation is skipped
Measure WidthHow far toward the light it looksLeave at the default (6)Set it large and even thick parts are judged thin
Shell FloorThe lower bound that treats hollow clothing as thin0.8 for skirts and capesAt 0 the measured value is used as is
Front Light FloorThe translucency ratio left under front light0.2At 0 skin stops looking like skin

SSAO (Screen Space Occlusion)​

It softly darkens folds and places where surfaces meet.

  1. Turn on SSAO Enabled on the body material.
  2. Set SSAO Intensity to 1.
  3. Set SSAO Radius to 0.005.
  4. Set SSAO Contrast to 1.

You succeeded when the place where clothing meets the body darkens.

A collar with SSAO off next to the same collar with it on

Inspector labelWhat it changesSuggested starting valueRaise it / lower it
SSAO IntensityThe strength of the effectLeave at the default (1)At 0 it is invisible, but the calculation still runs
SSAO RadiusThe distance over which occlusion is searchedLeave at the default (0.005)Growing it makes contact shading wider and softer
SSAO ContrastThe contrast of the occlusionLeave at the default (1)Raising it leaves only deeply carved places
QualityHow many depth samples SSAO reads per pixelLeave at the default (Low)Low 4 · Standard 8 · High 16
SSAO TintThe color multiplied only into occluded placesWhiteWhite leaves the existing shadow color alone

Inner Depth Edge​

It lives in the Inner Outline section. It draws lines on depth steps inside the silhouette.

  1. Check that Outline Master is on.
  2. Turn on Enable Inner Depth Edge.
  3. Set Width to 0.3.
  4. Set Inner Edge Color dark.

You succeeded when lines appear on collars and under the chin.

Inspector labelWhat it changesSuggested starting valueRaise it / lower it
WidthThe thickness of the inner boundary lineLeave at the default (0.3)Keeping it thinner than the normal outline is usual
Depth BiasThe smallest depth difference accepted as a boundaryLeave at the default (0.02)Lowering it attaches lines to gentle curvature and looks messy
Inner Edge ColorThe color of the inner boundary lineA color darker than the baseThe closer to black, the stronger the comic style
Outline MasterThe gate shared with the normal outlineOnWhile off, neither tab is drawn

Common problems​

No depth effect is visible at all​

  1. Check that the All Effects master and Depth Effects are on.
  2. Check that Master Width is not 0.
  3. Check that each module's intensity is not 0.
  4. Review Secure depth first above.

Setting the surface mode to Transparent turns everything off​

Transparent (3000) does not write depth. Change the surface mode to Semi-Transparent (2499) in Basic Settings. Semi-Transparent (2499) blends alpha while still writing depth.

The shadow does not follow the body inside a mirror​

In mirrors the depth modules step down no matter which value you pick.

More detail​