技能 编程开发 Three.js 屏幕空间环境光遮蔽

Three.js 屏幕空间环境光遮蔽

v20260922
threejs-screen-space-ambient-occlusion
此技能在 Three.js 中实现生产级 GTAO 路径,利用半分辨率地平线采样和反向深度重建。包含弯曲法线编码、全分辨率双边重建及环境光应用,增强接触阴影和光晕诊断,同时避免直接光照和发射变暗。
获取技能
485 次下载
概览

Screen-Space Ambient Occlusion

AO estimates missing ambient visibility. It must modulate indirect lighting, not repaint all scene color with a dark multiply.

Workflow

  1. Verify linear depth and view-space normals.
  2. Reconstruct view position consistently.
  3. Sample horizon visibility in a controlled radius.
  4. Estimate AO and optional bent normal.
  5. Denoise with depth/normal-aware filters.
  6. Apply to indirect diffuse and environment response.

Read references/gtao-bent-normal-pipeline.md.

Failure conditions

  • direct light and emission are darkened;
  • radius is specified only in pixels;
  • foreground silhouettes cast thick screen-space halos;
  • depth discontinuities are blurred together;
  • AO remains strong at distances where its world radius is subpixel;
  • bent normals are treated as ordinary geometric normals;
  • the implementation claims temporal accumulation even though this path has none.

Routing boundary

This skill owns GTAO gathering, bent normals, denoising, and AO application. Use $threejs-image-pipeline only when its depth/normal buffers or pass order must be coordinated with other image-space systems.

信息
Category 编程开发
Name threejs-screen-space-ambient-occlusion
版本 v20260922
大小 5.96KB
更新时间 2026-09-30
语言