Skip to content

Instantly share code, notes, and snippets.

@lucacss
lucacss / wgsl_3d_sdf.md
Created April 12, 2023 08:12 — forked from munrocket/wgsl_3d_sdf.md
WGSL 3D SDF Primitives

WGSL 3D SDF Primitives

How to use this gist:

  1. Build a sphere tracer with WebGPU (paper, paper2, youtube)
  2. Create model with sdf functions from here
  3. Add light and shadows
  4. ???
  5. PROFIT

This code tested in Chrome and Firefox, should work on PC too.