Materials: transparency blend modes (alpha/additive) + sorting
Materials already store a RenderState (BlendMode{disabled,alpha,additive}, cull, depth) and the PBR shader supports alpha-cutoff via discard, but blended transparency is not applied — the GPU pipeline uses a zeroed (opaque) blend state and there is no draw sorting.
Scope
- Honor
RenderState.blendin GpuRenderer: enable alpha/additive blend state (separate pipelines or dynamic state). - Back-to-front sort transparent draws; keep opaque depth-prepass behavior.
- Honor
RenderState.cull(back/front/none). - Wire an alpha mode for cutoff (mask) so
alpha_cutofftakes effect (shader already supports it via flags2). - Mirror what's feasible in the software renderer.
Acceptance
- An alpha-blended material renders see-through with correct ordering; additive glows; cull mode is respected.
Edited by Bruno Massa