Skip to content

Feature/depth#50

Draft
ogdakke wants to merge 2 commits intomainfrom
feature/depth
Draft

Feature/depth#50
ogdakke wants to merge 2 commits intomainfrom
feature/depth

Conversation

@ogdakke
Copy link
Owner

@ogdakke ogdakke commented Mar 16, 2026

adds depth estimation via depth-anything-v2. Shaders change their intensity based on depth. Depth of field effect is added as a post-processing step.

Probably won't merge as it doesn't really add any value and costs a lot in terms of bandwith+fair bit of compute for clients

ogdakke added 2 commits March 16, 2026 15:46
… export, duplication, URL sync, DoF post-processing

Core depth pipeline: DepthService with Depth Anything V2 Small (WebGPU/WASM),
per-entity depth textures in canvas-renderer, 1x1 mid-gray fallback.

Shader depth support: all 7 shaders (halftone, blobs, melt, glass, glitch,
dithering ordered, ASCII) modulate effects via depth. ASCII bindings shifted
to 5-6 to accommodate depth at 3-4. hasDepth uniform packs enabled/invert/influence.

Undo/redo: estimateDepth pushes command (undo clears, redo re-estimates).
clearDepthMap saves bitmap before clearing for undo restoration.

Serialization: depth maps saved as depth/{entityId}.png in .vdmsh zip,
restored on load via uploadDepthBitmap. Backward compatible.

Export: showDepth visualization works in static exports via CopyPass intercept.
Entity duplication clones depth textures GPU-side.

URL sync: depthInfluence and depthInvert params synced to URL.

Keyboard shortcuts: Shift+D generate, Shift+Alt+D clear, Alt+D visualize.

Depth-of-field post-processing: integrated into post-process shader with
Kawase blur (4-level mip chain), depth-based CoC mixing. Desktop sidebar
and mobile controls for focus, range, and strength params.
@vercel
Copy link

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
voidmesh Ready Ready Preview, Comment Mar 16, 2026 2:42pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant