ScreenSpaceAmbientOcclusion

ScreenSpaceAmbientOcclusion

  • quality_level : bevy_pbr::ssao::ScreenSpaceAmbientOcclusionQualityLevel
  • constant_object_thickness : f32

Description

Component to apply screen space ambient occlusion to a 3d camera.

Screen space ambient occlusion (SSAO) approximates small-scale, local occlusion of indirect diffuse light between objects, based on what's visible on-screen. SSAO does not apply to direct lighting, such as point or directional lights.

This darkens creases, e.g. on staircases, and gives nice contact shadows where objects meet, giving entities a more "grounded" feel.

Usage Notes

Requires that you add [ScreenSpaceAmbientOcclusionPlugin] to your app.

It strongly recommended that you use SSAO in conjunction with TAA ([bevy_core_pipeline::experimental::taa::TemporalAntiAliasing]). Doing so greatly reduces SSAO noise.

SSAO is not supported on WebGL2, and is not currently supported on WebGPU.

Functions