Skip to content

Add translucent block rendering (glass, water, ice)#132

Open
Purdze wants to merge 2 commits intomasterfrom
feat/translucent-blocks
Open

Add translucent block rendering (glass, water, ice)#132
Purdze wants to merge 2 commits intomasterfrom
feat/translucent-blocks

Conversation

@Purdze
Copy link
Copy Markdown
Collaborator

@Purdze Purdze commented Apr 5, 2026

Summary

  • Parse 26.1.1 texture format and classify translucent blocks (glass, stained glass, water, ice)
  • Add separate translucent rendering pass with its own pipeline and fragment shader
  • Extend chunk buffer/mesher to handle translucent geometry alongside opaque

Test plan

  • Glass and stained glass render with transparency
  • Water and ice render correctly
  • Opaque blocks unaffected
  • No perf regression on chunk meshing

Purdze added 2 commits April 6, 2026 22:08
- Handle nested texture objects with sprite/force_translucent fields
  in model JSON (26.1.1 changed glass/stained glass format)
- Add Translucent block classification for glass, stained glass,
  stained glass panes, ice, slime, honey, tinted glass
- Glass borders now render (full translucency requires second pass)
- Separate translucent vertex/index buffers per chunk
- Translucent pipeline with alpha blending (SRC_ALPHA/ONE_MINUS_SRC_ALPHA),
  depth test on, depth write off
- chunk_translucent.frag: discard at alpha < 0.01 (not 0.5)
- Mesher routes Translucent and Water blocks to translucent buffers
- Drawn after opaque chunks, entities, and item entities
- Per-chunk translucent data combined into single buffer when dirty
@Purdze Purdze force-pushed the feat/translucent-blocks branch from d95307a to de82bd9 Compare April 6, 2026 21:11
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