Rendering
Univis rendering is built on custom SDF materials:
UNodeMaterialfor the 2D pathUNodeMaterial3dfor the 3D path
Main files:
src/layout/render/system.rssrc/layout/render/material.rssrc/layout/render/material_3d.rssrc/layout/render/shaders/unode.wgslsrc/layout/render/shaders/unode_3d.wgsl
Update Path
The render sync system:
- reads
UNode,ComputedSize,UBorder,UImage,UI3d, andUPbr - chooses the 2D or 3D path from the resolved root context
- reuses
MaterialHandlesto reduce allocations - passes clipping data to the 2D material path
Why SDF?
- clean edges under zoom
- good support for border radius, clipping, and antialiasing
- flexibility for both
RoundandCutshapes