360 Secure SkillHub
360 安全技能中心

threejs-screen-space-ambient-occlusion

提供 Three.js 中 GTAO 的实现流程与诊断要点,覆盖半分辨率地平线采样、反向深度重建、弯曲法线编码、全分辨率双边重建、环境光应用、接触接地和光晕问题,并列出常见失败条件。

分类:开发
scottstts
热度 0.00
最近更新 2026-11-01 05:12:37

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add scottstts/threejs-awesome-graphics-agent-skills/threejs-screen-space-ambient-occlusion
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
threejs-screen-space-ambient-occlusion
description
Implement a production GTAO path in Three.js. Use for half-resolution horizon sampling, reversed-depth reconstruction, bent-normal encoding, full-resolution bilateral reconstruction, environment-light application, contact grounding, and halo diagnosis.

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.