It upscales an image by a factor of
The dataset that was used to train the upscaling neural network was generated with Blender's Geometry Nodes. No artist's work was used in the process.
- Generate procedural data-set with Blender Geometry Nodes.
- Create a slim network architecture.
- Train the network.
- Create ray marching renderer (for SDFs).
- Implement inference on the WebGPU.
- Use multisampling for render passes.
- Create rasterizing renderer (polygonal geometry).
- Extract into a separate package, to be used as an upscaling step in other WebGPU projects.
- Install Node.js 22.12+
- Install pnpm
- Run
pnpm installto install all dependencies - Run
pnpm devto run the development server, making the web app available via the web browser.
- Run
pnpm checkto lint with oxlint and check formatting with oxfmt. - Run
pnpm fixto apply lint fixes and format files. - Use
pnpm lintorpnpm format:checkto run either check independently. - Install the recommended Oxc VS Code extension for linting and formatting on save. Astro files continue to use the Astro extension for formatting.
The workspace uses TypeGPU 0.12.4 and unplugin-typegpu 0.12.3. Shaders are
TypeScript functions marked with 'use gpu', including the convolution passes,
bicubic filter, scene shaders, and optional edge-detection and cone-tracing
passes. The demo uses published @typegpu/sdf and @typegpu/color packages.
The pretrained inference model, convolution shaders, and color utilities live in
packages/phoure-js; the demo consumes its MenderStep API from phoure. See
the package README for inputs and lifecycle.
The typescript dependency is an npm alias for tsover 5.9.13, including a
pnpm override for build plugins. This supports vector and matrix operators while
remaining compatible with the existing Astro/Starlight stack. Select Use
Workspace Version for TypeScript in VS Code; the existing SDK path still
applies.
pnpm checkincludes the recommended TypeGPU shader rules through oxlint.pnpm test:typeschecks every workspace with tsover.pnpm test:unitruns math and shader-generation tests, including all three neural-network layer configurations.pnpm testbuilds the workspace and runs both checks.
The optional cone tracer now accepts { root, cBuffer }, with buffers allocated
by makeCBuffer(root, resolution). Edge detection accepts root in place of
the old runtime. Both were unfinished modules using APIs removed from TypeGPU.
