环境光遮挡 (Ambient occlusion, AO) 功能可以模拟折痕线、小孔和平行表面中出现的柔和阴影。这些区域将遮挡(阻挡)环境光,因此它们看起来较暗。
此功能可以估算环境光照射到表面上某一点的光照强度。然后,此功能会使折痕线、小孔和平行表面变暗。
环境光遮挡功能可用于增添光照的真实感。
如果在场景中启用了 Baked Global Illumination,Unity 可以将环境光遮挡烘焙到光照贴图中。这称为烘焙环境光遮挡 (Baked Ambient Occlusion)。
要在场景中启用烘焙环境光遮挡,请执行以下操作:
If Global Illumination is not enabled in your Scene but you still want the effect of ambient occlusion, you can use a post-processing effect to apply real-time ambient occlusion to your Scene.
If Enlighten Realtime Global Illumination is enabled in your Scene, the resolution for indirect lighting does not capture fine details or dynamic objects. We recommend using a real-time ambient occlusion post-processing effect, which has much more detail and results in higher quality lighting.
For information on real-time ambient occlusion post-processing effects, see post-processing effects.
要更详细了解 AO,请参阅 Wikipedia:环境光遮挡 (Ambient Occlusion)。