SDF Lab
/
Editor
v0.3
Why?
Tour
README
▶ Play
FPS
0.0
FRAME
0.00ms
STEPS
0
AVG
0
RES
0×0
PASSES
1
FBO
—
▢ cinema
⤢ full
drag orbit · wheel/pinch zoom · hover to probe
K (blend)
0.35
Resolution ×
0.75
Animate
▾
Instrumentation
debug views · autopilot · probe
view compiled shader
Debug view
0 — shaded
1 — step heatmap
2 — normals
3 — distance slice
4 — total overdraw
Autopilot FPS
Target FPS
60
hover the render to probe per-pixel step cost
▾
Pipeline · Post · Effects
bloom · temporal · fog · bounces
melt it
Post pipeline (multi-pass FBO)
Bloom
Temporal accumulate
Bloom threshold
0.75
Bloom intensity
0.60
Temporal blend
0.85
on when idle → free denoise for AO / shadows
Blue-noise jitter
Jitter amount
1.00
trades stepping bands for high-freq noise (pair with temporal)
Heavy shading (real GPU cost)
Reflection bounces
0
Subsurface
Subsurface depth
0.25
Volumetric fog
Fog samples
8
Fog density
0.60
Adaptive quality
Depth-adaptive steps
far rays get 35% of the step budget
Dynamic resolution
Target frame ms
16.0ms
▸
Stress
crank to find the cliff
▾
User Params
from //@param comments
declare with
//@param name min max default
in your map() and recompile
▾
Scenes
presets · save · share · export
Preset
choose…
blended primitives (default)
gyroid slab
infinite pillars
menger-ish cross
mandelbulb-ish
Save
Export
PNG
.frag
JSON
Import JSON
Hardware report
HTML 🔒
Godot 🔒
Godot (store) 🔒
Record video 🔒
Share & compare
Copy share link
Mirror to device
Snapshot for compare
Saved
(no saved scenes yet — name one above and hit Save)
map.frag
show cheatsheet
last ok compile: —
Recompile ⌘/Ctrl+↵
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// map(p) returns the signed distance from point p to the scene. // Helpers: sdSphere, sdBox, sdRoundBox, sdTorus, sdCapsule, sdPlane, // smin, smax, sdSub. Uniforms: uTime, uK. // // TIP: add sliders by declaring uniforms in a comment. Try dragging me: //@param sphereR 0.2 1.2 0.55 //@param torusR 0.2 1.0 0.55 //@param wobble 0.0 1.5 0.15 float map(vec3 p) { float t = uTime; float k = uK; float ground = sdPlane(p, vec3(0.0, 1.0, 0.0), 1.0); vec3 sp = p - vec3(sin(t) * 0.9, 0.0, cos(t) * 0.9); float sphere = sdSphere(sp, sphereR); float box = sdRoundBox(p, vec3(0.6), 0.15); vec3 tp = p - vec3(0.0, 0.9 + sin(t*1.3)*wobble, 0.0); float torus = sdTorus(tp.xzy, vec2(torusR, 0.14)); float d = smin(sphere, box, k); d = smin(d, torus, k); d = min(d, ground); return d; }
✓ shader compiled cleanly