Skip to main content
Version: 10.0

Screen Space Ambient Occlusion

In 3D graphics, ambient occlusion is a global illumination term that measures how much ambient light can reach a surface. Poiyomi's Screen-Space Ambient Occlusion (SSAO) is an approximation of this shadowing that is useful for adding depth and crisp detail shadows.

Pro Feature
Requires Depth Buffer

In order to use SSAO, you will need to place the DepthGet Prefab found in the Assets/_PoiyomiShaders/Prefabs on your avatar.

Recommended Toggle Setup

SSAO is a performance heavy effect, so use it mindfully. Add a toggle for Animatable Toggle below, and for toggling the DepthGet object. Both should be disabled by default and unsaved. In some Worlds, you can get away without activating your depth light!

Animatable Toggle​

Type
Toggle

This checkbox allows toggling SSAO at runtime.

tip

SSAO rendering is enabled by default. To turn off SSAO in-game, you need to animate this Toggle (checkbox) when creating toggles for SSAO on this Material. Animating the Section Header will not work!

AO Intensity​

Type
Range
Range
0to5

Determines how intensely AO will be blended.

AO Radius​

Type
Range
Range
0.0001to0.02

Determines the radius tested for hemispheric visibility check. This controls how far AO shadows can spread out.

AO Quality​

Type
Range
Range
2to10
Performance

This directly controls how many samples from the depth buffer AO takes for each pixel it is run on. If you fill your display with SSAO pixels (common when cuddling, for example) this performance cost adds up. Try starting at 4, and adding .05 jitter. Make sure you evaluate changes in-game and in VR - artifacts isn't generally as noticeable in motion.

Determines how many samples are taken and how they're distributed, whether that would be sharper or smoothened.

Lower Values will make it look more like a cel-shader, while Higher Values will make it look more smooth and cleaner.

Center Importance​

Type
Range
Range
0to1

Weights shadows towards the source of occlusion, making shadow falloff more gradual.

Depth Bias​

Type
Range
Range
0to0.2

Clips away the least intense shadows to help reduce visual artifacts.

Cone Bias​

Type
Range
Range
0to1

Reduces shadowing on geometry that isn't actually occluded. Generally, you should use this instead of Depth bias.

Random Jitter​

Type
Range
Range
0to1

Adds a dithered jitter effect which can help mask lower sample counts.

Use Normals​

Type
Range
Range
0to1

0 uses vertex normals, 1 uses per-pixel normals when calculating the SSAO.

Color and Masking​

Color​

Type
Texture Slot
Accepts
Color texturesRGB On

Color Map allows the user to map SSAO shadow color using a texture.

Mask​

Type
Texture Slot
Accepts
Data texturesRGB Off

Color Mask allows the user to mask out certain areas from being affected by SSAO.

HSVG​

Type
Float4

Color Adjust fields for SSAO. Refers to Hue, Saturation, Brightness, and Gamma.

ChannelFunction
XHue
YSaturation
ZValue/Brightness
WGamma

Color​

Type
Color

SSAO shadow color. Black by default.

Use Surface Color​

Type
Range
Range
0to1

Samples the color from the surface of the Material to use for the SSAO color.

Blend Mode​

Type
Dropdown
Options
ReplaceDarkenMultiplyLightenScreenSubtractAddOverlay

Which blending operation to use for the SSAO color.

Advanced & Global Masks​

Hide In Light​

Type
Range
Range
0to1

Stylistically hide SSAO under bright lighting conditions.

Quality Falloff Start​

Type
Float

The distance from the camera, in meters, beyond which AO will steadily reduce quality to improve performance.

Quality Falloff End​

Type
Float

The distance from the camera, in meters, beyond which AO will be completely disabled to improve performance.

Max Distance Falloff​

Type
Float2

Reduce these if your AO looks like it's "reaching too far". X determines the difference in depth (beyond the radius) beyond which AO shadows will begin to attenuate. Y determines the difference in depth (beyond the radius) beyond which AO shadows will completely terminate.

Apply From Global Mask​

Type
Dropdown
Options
Off1R1G1B1A2R2G2B2A3R3G3B3A4R4G4B4A

Select which Global Mask to apply to SSAO.

Apply To Global Mask​

Type
Dropdown
Options
Off1R1G1B1A2R2G2B2A3R3G3B3A4R4G4B4A

Select which Global Mask SSAO writes to.