Mesh Transparency
App: apps/mesh_transparency/
Shows the per-mesh render state you can set on a procedurally-built Mesh: an opaque red quad in back, with two translucent panes (green, blue) in front. Where a pane overlaps the red quad you see red through it, and where the panes overlap each other they blend too.
Run from root
Section titled “Run from root”% ./plume3d mesh_transparencyor
Run from app directory
Section titled “Run from app directory”% ./../plume3d .What it does
Section titled “What it does”- Builds three quads with
Graphics.newMesh(...); the translucent ones carry a vertex alpha of0.5. greenGlass.blendMode = "alpha"andblueGlass.blendMode = "alpha"— src-alpha blending. The engine draws opaque geometry first, then blends the translucent meshes back-to-front (no depth write), so they layer correctly regardless of submission order.blueGlass.doubleSided = true— convenience forcullMode = "none". SetcullMode = "back"on a consistently-wound mesh to draw it single-sided.- The
triangleshader outputs the vertex colour’s alpha, so per-vertex alpha< 1becomes visible translucency onceblendModeis"alpha".
Imported .blend materials set blendMode / cullMode automatically from the material’s transparency and back-face-culling settings — this example is the procedural counterpart.