gioser

tawasuyu/llimphi

Sovereign retained-mode GPU UI framework in Rust (wgpu+vello+taffy+parley), Elm loop, 40+ widgets.

Rust 484Markdown 258TOML 131RON 38118 Definitions

⎇ main llimphi-3d/README.md Markdown · 31 lines · 1.1 KB History raw

chore: refresco desde el monorepo — 27 crates nuevos (anim, lottie, svg, mesh, image, layer, test, wire-view, widgets rag-sidebar/router/lazy-list/rive-button) y sync de los 95 existentes 93253cc22 · Sergio ·

1# llimphi-3d
2
3Llimphi's base 3D pass (M0 of the 3D engine).
4
5The minimum needed for **real 3D inside a Llimphi `View`**: a `Camera3d`
6(view/projection matrices with `glam`), a depth buffer of its own, and a
7`Renderer3d` that draws indexed geometry with depth testing over the frame's
8intermediate texture.
9
10## How it fits the Elm loop + vello + wgpu
11
12Llimphi already rasterizes the UI with vello onto an intermediate texture and
13exposes `View::gpu_paint_with` to inject a direct GPU pass *after* vello (with
14`LoadOp::Load`, preserving the UI). `Renderer3d::render` has **exactly** the
15signature that closure needs (`device, queue, encoder, target_view, (w, h),
16&camera`), so a 3D node is:
17
18```ignore
19let r3d = Arc::new(Mutex::new(Renderer3d::new(&device, fmt)));
20View::empty().gpu_paint_with(move |dev, q, enc, view, rect, vp| {
21    r3d.lock().unwrap().render(dev, q, enc, view, vp, &camera);
22})
23```
24
25It is not a second engine: it runs on the **same wgpu** Llimphi already uses,
26which in turn translates to Vulkan/Metal/DX12/GL/WebGPU. See
27`01_yachay/dominium/MOTOR-VOXEL.md` §11 for the full route (M0..M4).
28
29---
30
31Part of **llimphi** — see [llimphi](../README.md).

README.md

llimphi-3d

Llimphi's base 3D pass (M0 of the 3D engine).

The minimum needed for real 3D inside a Llimphi View: a Camera3d (view/projection matrices with glam), a depth buffer of its own, and a Renderer3d that draws indexed geometry with depth testing over the frame's intermediate texture.

How it fits the Elm loop + vello + wgpu

Llimphi already rasterizes the UI with vello onto an intermediate texture and exposes View::gpu_paint_with to inject a direct GPU pass after vello (with LoadOp::Load, preserving the UI). Renderer3d::render has exactly the signature that closure needs (device, queue, encoder, target_view, (w, h), &camera), so a 3D node is:

let r3d = Arc::new(Mutex::new(Renderer3d::new(&device, fmt)));
View::empty().gpu_paint_with(move |dev, q, enc, view, rect, vp| {
    r3d.lock().unwrap().render(dev, q, enc, view, vp, &camera);
})

It is not a second engine: it runs on the same wgpu Llimphi already uses, which in turn translates to Vulkan/Metal/DX12/GL/WebGPU. See 01_yachay/dominium/MOTOR-VOXEL.md §11 for the full route (M0..M4).


Part of llimphi — see llimphi.