Assign an ambient occlusion texture
To assign an ambient occlusion texture to a GameObject, follow these steps:
Use an external software package to create a single-channel ambient occlusion texture that maps the corners and crevices where light is occluded. Use values closer to
0
to indicate more occlusion, and values closer to1
to indicate less occlusion.Create a mask map texture, and use the ambient occlusion texture as the green channel.
Import the mask map texture into Unity.
Select a material in the Project window, then drag the mask map texture into the Occlusion (⊙) property of the Inspector window.
HDRP also uses the ambient occlusion texture to calculate specular occlusion, by reducing the intensity of reflections in corners.
Note: Ambient occlusion in a Lit Shader using deferred rendering affects emission due to a technical constraint. Lit Shaders that use forward rendering don't have this constraint and don't affect emission.
For more information about ambient occlusion texture properties in an HDRP material, refer to the material in Materials and surfaces.