mcpbeat

Threejs Screen Space Ambient Occlusion

scottstts/threejs-screen-space-ambient-occlusion

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.

3k tokens
context cost
the whole folder, loaded on every use
3
files
instructions only
0
copies elsewhere
how many repositories repackaged it
527
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/scottstts/Threejs-Awesome-Graphics-Agent-Skills --skill threejs-screen-space-ambient-occlusion

The instruction itself

4 sections, as written by the author

Screen-Space Ambient Occlusion

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

Workflow

  • Verify linear depth and view-space normals.
  • Reconstruct view position consistently.
  • Sample horizon visibility in a controlled radius.
  • Estimate AO and optional bent normal.
  • Denoise with depth/normal-aware filters.
  • 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.

How to use it

Copy the folder

Take scottstts/threejs-screen-space-ambient-occlusion from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.