forked from 1b-agent/opencadstudio-upstream
Once solids carried a real sub-1 alpha (after the ENC transparency fix), the single depth-writing mesh pass made a transparent solid occlude the geometry behind it: it wrote depth at its near surface, so anything farther failed the LessEqual test and was never drawn — the transparent fill looked like it erased what was behind it. The batched mesh builder now routes each solid's triangles into an opaque or a transparent index stream by its baked colour alpha (< 0.999). The opaque fills draw first and write depth; the transparent fills draw last through a new depth-write-disabled pipeline, so they blend over the geometry behind them instead of culling it. The hidden-line depth prepass still rasterises both streams so solid surfaces keep occluding hidden edges. Co-Authored-By: Claude Opus 4.8 <[email protected]>