{"_id":"@aperture-engine/webgpu","_rev":"3-2578ff69ccda6ae25528df3b7f16af80","name":"@aperture-engine/webgpu","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@aperture-engine/webgpu","version":"0.1.0","keywords":["aperture","webgpu","game-engine","renderer","ecs","pbr","typescript"],"author":{"name":"Felix Zhang"},"license":"MIT","_id":"@aperture-engine/webgpu@0.1.0","maintainers":[{"name":"felixtrz","email":"felixtrz96@gmail.com"}],"homepage":"https://github.com/felixtrz/aperture/tree/main/packages/webgpu#readme","bugs":{"url":"https://github.com/felixtrz/aperture/issues"},"dist":{"shasum":"33fc1a1e2c38b3ad4e10d7cdaa5343af7d87f6af","tarball":"https://registry.npmjs.org/@aperture-engine/webgpu/-/webgpu-0.1.0.tgz","fileCount":1360,"integrity":"sha512-8l/dlXcPBYTGaD9fM6xxXDL6u0aazi73tgIiLp9AYtYgwhstjR3V2YgEjw+Cz7XSnK07WDdWSbcqZcRZIiIiRQ==","signatures":[{"sig":"MEQCIA6BfgsO/ciWs8R3t0z8zhUtOghXJav5caWWkv8KgkntAiBR5Vzj29Y+VbUSbq2gtAMCgs4g8BnO9n33MMZk06LjBg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11114826},"main":"./dist/index.js","type":"module","_from":"file:aperture-engine-webgpu-0.1.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./test-support":{"types":"./dist/test-support.d.ts","import":"./dist/test-support.js"}},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"felixtrz","email":"felixtrz96@gmail.com"},"_resolved":"/private/var/folders/xc/nttyc9pj3xngmbjsfbgdbddc0000gn/T/dfa2ba2bff9e4e21607b6456031b8e00/aperture-engine-webgpu-0.1.0.tgz","_integrity":"sha512-8l/dlXcPBYTGaD9fM6xxXDL6u0aazi73tgIiLp9AYtYgwhstjR3V2YgEjw+Cz7XSnK07WDdWSbcqZcRZIiIiRQ==","repository":{"url":"git+https://github.com/felixtrz/aperture.git","type":"git","directory":"packages/webgpu"},"_npmVersion":"11.12.1","description":"WebGPU rendering backend for the Aperture game engine: materials, shadows, IBL, post effects, picking, text, UI, and particles.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@aperture-engine/render":"^0.1.0","@aperture-engine/runtime":"^0.1.0","@aperture-engine/simulation":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/webgpu_0.1.0_1782151634499_0.3573836894668099","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aperture-engine/webgpu","version":"0.2.0","keywords":["aperture","webgpu","game-engine","renderer","ecs","pbr","typescript"],"author":{"name":"Felix Zhang"},"license":"MIT","_id":"@aperture-engine/webgpu@0.2.0","maintainers":[{"name":"felixtrz","email":"felixtrz96@gmail.com"}],"homepage":"https://github.com/felixtrz/aperture/tree/main/packages/webgpu#readme","bugs":{"url":"https://github.com/felixtrz/aperture/issues"},"dist":{"shasum":"e6fe3a6409678b5358dca837037b7a5afb9201ab","tarball":"https://registry.npmjs.org/@aperture-engine/webgpu/-/webgpu-0.2.0.tgz","fileCount":1360,"integrity":"sha512-w+h/hH1EqDswJDtwkMFeHxewPq+HXxi1t5lc6H7i0Qhb8yCHq1joKjZqo4GWXBsadpFHxG5+AtQQn9UdUMmeAg==","signatures":[{"sig":"MEUCIGEgmyXkYJf6bjMRxeBPLZh7pwgQo86ICPC3kFNroSDyAiEA/tCpJ7L8KzPORMLeVxzKdfeIUVdw4XdllRoViBRYGxA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11114826},"main":"./dist/index.js","type":"module","_from":"file:aperture-engine-webgpu-0.2.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./test-support":{"types":"./dist/test-support.d.ts","import":"./dist/test-support.js"}},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"felixtrz","email":"felixtrz96@gmail.com"},"_resolved":"/private/var/folders/xc/nttyc9pj3xngmbjsfbgdbddc0000gn/T/15baacee9d42c2dc81d8944fbab4d2af/aperture-engine-webgpu-0.2.0.tgz","_integrity":"sha512-w+h/hH1EqDswJDtwkMFeHxewPq+HXxi1t5lc6H7i0Qhb8yCHq1joKjZqo4GWXBsadpFHxG5+AtQQn9UdUMmeAg==","repository":{"url":"git+https://github.com/felixtrz/aperture.git","type":"git","directory":"packages/webgpu"},"_npmVersion":"11.12.1","description":"WebGPU rendering backend for the Aperture game engine: materials, shadows, IBL, post effects, picking, text, UI, and particles.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"@aperture-engine/render":"^0.2.0","@aperture-engine/runtime":"^0.2.0","@aperture-engine/simulation":"^0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/webgpu_0.2.0_1782246148799_0.8075976387099402","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@aperture-engine/webgpu","version":"0.3.0","description":"WebGPU rendering backend for the Aperture game engine: materials, shadows, IBL, post effects, picking, text, UI, and particles.","author":{"name":"Felix Zhang"},"repository":{"type":"git","url":"git+https://github.com/felixtrz/aperture.git","directory":"packages/webgpu"},"homepage":"https://github.com/felixtrz/aperture/tree/main/packages/webgpu#readme","bugs":{"url":"https://github.com/felixtrz/aperture/issues"},"keywords":["aperture","webgpu","game-engine","renderer","ecs","pbr","typescript"],"type":"module","license":"MIT","sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./test-support":{"types":"./dist/test-support.d.ts","import":"./dist/test-support.js"},"./package.json":"./package.json"},"main":"./dist/index.js","types":"./dist/index.d.ts","publishConfig":{"access":"public"},"dependencies":{"@aperture-engine/runtime":"^0.3.0","@aperture-engine/render":"^0.3.0","@aperture-engine/simulation":"^0.3.0"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_id":"@aperture-engine/webgpu@0.3.0","_integrity":"sha512-oRhBKS1cLU5GUzvFt48rPn8EXh0YVw9BoBQs58V2RljDb6l3IF7bX6l4cOtZm8d8Mh9AMki4jKNWGMMKirAnrQ==","_resolved":"/private/var/folders/xc/nttyc9pj3xngmbjsfbgdbddc0000gn/T/71de9827d30cfa5359be00899c761d04/aperture-engine-webgpu-0.3.0.tgz","_from":"file:aperture-engine-webgpu-0.3.0.tgz","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-oRhBKS1cLU5GUzvFt48rPn8EXh0YVw9BoBQs58V2RljDb6l3IF7bX6l4cOtZm8d8Mh9AMki4jKNWGMMKirAnrQ==","shasum":"e8c8510b082affc86a660df9c9b6eb0735021b8c","tarball":"https://registry.npmjs.org/@aperture-engine/webgpu/-/webgpu-0.3.0.tgz","fileCount":1368,"unpackedSize":11338953,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGoykDCAfwpH8Tj8IGd0GXXr19e265PFUjbpizn6C7AUAiAcWnFsQLZrF94mYUMFRaAO2KkHyZUrZ7d3sNg/kdnE+A=="}]},"_npmUser":{"name":"felixtrz","email":"felixtrz96@gmail.com"},"directories":{},"maintainers":[{"name":"felixtrz","email":"felixtrz96@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/webgpu_0.3.0_1783122769166_0.19649177073089308"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-22T18:07:14.263Z","modified":"2026-07-03T23:52:49.500Z","0.1.0":"2026-06-22T18:07:14.679Z","0.2.0":"2026-06-23T20:22:29.001Z","0.3.0":"2026-07-03T23:52:49.372Z"},"bugs":{"url":"https://github.com/felixtrz/aperture/issues"},"author":{"name":"Felix Zhang"},"license":"MIT","homepage":"https://github.com/felixtrz/aperture/tree/main/packages/webgpu#readme","keywords":["aperture","webgpu","game-engine","renderer","ecs","pbr","typescript"],"repository":{"type":"git","url":"git+https://github.com/felixtrz/aperture.git","directory":"packages/webgpu"},"description":"WebGPU rendering backend for the Aperture game engine: materials, shadows, IBL, post effects, picking, text, UI, and particles.","maintainers":[{"name":"felixtrz","email":"felixtrz96@gmail.com"}],"readme":"# @aperture-engine/webgpu\n\nThe WebGPU rendering backend for the Aperture game engine: it turns a render snapshot into pixels, covering materials, shadows, IBL, post effects, picking, sprites, text, UI, and particles.\n\n## Install\n\n```sh\npnpm add @aperture-engine/webgpu\n```\n\nThis package is part of the [Aperture](https://github.com/felixtrz/aperture) engine. It consumes `RenderSnapshot` data produced by `@aperture-engine/render` and the simulation/runtime packages, so it is normally used alongside the other `@aperture-engine/*` packages.\n\n## What it does\n\n`@aperture-engine/webgpu` owns the GPU side of a frame. `createWebGpuApp` initializes a WebGPU device for a canvas, wires up a `RenderWorld`, and exposes a `WebGpuApp` that renders `RenderSnapshot`s through a single-encoder frame graph. It implements the standard/unlit/custom-WGSL material pipelines, directional/spot/point shadow atlases, image-based lighting (BRDF LUT, irradiance/specular convolution, equirect-to-cube), MSDF text, UI quads, and a particle pipeline, plus a stack of post effects (tonemap, bloom, depth of field, FXAA/TAA, SSAO, SSR) and GPU picking. The lower-level `initializeWebGpu` / `detectWebGpuSupport` helpers are available when you need to manage the device yourself.\n\n## Usage\n\n```ts\nimport {\n  createWebGpuApp,\n  createWebGpuBloomPostEffect,\n  createWebGpuTonemapPostEffect,\n} from \"@aperture-engine/webgpu\";\n\nconst result = await createWebGpuApp({\n  canvas,\n  simulationWorker, // drives the ECS and emits RenderSnapshots\n  postEffects: [\n    createWebGpuBloomPostEffect(),\n    createWebGpuTonemapPostEffect({ operator: \"aces\" }),\n  ],\n});\n\nif (!result.ok) {\n  throw new Error(`WebGPU unavailable: ${result.reason} (${result.message})`);\n}\n\nconst { app } = result;\n\n// Render a frame from a snapshot.\nawait app.renderSnapshot(snapshot);\n\n// GPU picking: resolve the entity under a pixel.\nconst entity = await app.pick(x, y);\n```\n\nIf you only need a configured device, `initializeWebGpu({ canvas })` returns a discriminated result with the `adapter`, `device`, `context`, and swapchain `format`.\n\n## Entry points\n\n| Subpath                                | Description                                                                                                                                                                                               |\n| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `@aperture-engine/webgpu`              | The public backend surface: `createWebGpuApp`/`WebGpuApp`, `initializeWebGpu`/`detectWebGpuSupport`, material, shadow, IBL, text, UI, and particle pipelines, the frame graph, and post-effect factories. |\n| `@aperture-engine/webgpu/test-support` | Extra internals (resource caches, diagnostics summaries, parity helpers) used by the engine's tests; not part of the stable API.                                                                          |\n\n## License\n\nPart of the [Aperture monorepo](https://github.com/felixtrz/aperture). MIT licensed.\n","readmeFilename":"README.md"}