npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8ao-webgpu

v0.1.0

Published

Unofficial Three.js WebGPU/TSL adaptation of N8AO.

Readme

n8ao-webgpu

Unofficial Three.js WebGPU/TSL adaptation of N8AO.

This package was extracted from an internal project after implementing a reusable WebGPU path based on the behavior, configuration model, and conventions of N8AO by N8python.

Status:

What It Provides

n8ao-webgpu exposes:

  • N8AONode as the core AO compositor node
  • createN8AOScenePass() as a small helper for creating the required beauty/depth/normal scene pass
  • upstream-aligned config helpers such as createDefaultN8AOConfiguration(), applyQualityMode(), and resolveDisplayMode()

It does not attempt to wrap React, R3F, or postprocessing libraries directly.

Compatibility

  • three@^0.182.0
  • Three.js WebGPU/TSL pipeline
  • package format: ESM

Install

npm install n8ao-webgpu three

Peer dependency:

  • three@^0.182.0

Why This Exists

Upstream N8AO currently targets WebGL and explicitly notes that WebGPU is not officially supported yet. This package adapts the same AO approach to Three.js WebGPU/TSL so it can be reused in projects that already use the node-based WebGPU pipeline.

Live Reference

This package was extracted from the WebGPU AO work originally developed for OpenHuman Atlas.

  • Live atlas reference: https://atlas.openhumanatlas.com
  • Main site: https://www.openhumanatlas.com

Treat OpenHuman Atlas as the public production reference for the original integration lineage behind this package.

Basic Usage

import { PostProcessing } from "three/webgpu";
import { N8AONode, createN8AOScenePass } from "n8ao-webgpu";

const scenePass = createN8AOScenePass(scene, camera);

const n8ao = new N8AONode({
  beautyNode: scenePass.getTextureNode("output"),
  beautyTexture: scenePass.getTexture("output"),
  depthNode: scenePass.getTextureNode("depth"),
  depthTexture: scenePass.getTexture("depth"),
  normalNode: scenePass.getTextureNode("normal"),
  normalTexture: scenePass.getTexture("normal"),
  scenePassNode: scenePass,
  scene,
  camera,
});

n8ao.configuration.screenSpaceRadius = true;
n8ao.configuration.aoRadius = 32;
n8ao.configuration.halfRes = true;
n8ao.configuration.depthAwareUpsampling = true;

const post = new PostProcessing(renderer);
post.outputNode = n8ao.getTextureNode();

When To Use It

Use this package if:

  • you are already on Three.js WebGPU
  • you want an N8AO-like AO pipeline in TSL/node-based rendering
  • you are comfortable wiring your own scene pass and post-processing flow

Do not use this package if:

  • you need a WebGL drop-in AO pass
  • you want a React-only abstraction
  • you need a fully stable, upstream-supported API surface

Notes

  • scenePassNode is optional, but recommended when the scene pass is not already guaranteed to receive its own updateBefore() calls each frame.
  • The helper preserves the bandwidth optimization from the original extraction by forcing the diffuse and normal MRT textures to UnsignedByteType.
  • The config intentionally keeps some upstream fields for parity even if not all of them are currently wired in the WebGPU path.

Caveats

  • This is not an official upstream N8AO package.
  • The API is intentionally close to the original extraction, but may still change.
  • It assumes familiarity with Three.js WebGPU render-graph style setup.

Attribution

This package is derived from and inspired by:

  • N8AO by N8python: https://github.com/N8python/n8ao

See NOTICE.md for attribution and licensing background.

Validation

This repo is validated with:

  • pnpm test
  • pnpm build
  • GitHub Actions CI in .github/workflows/ci.yml