Skip to content

draw particles through shader pack programs - #862

Merged
Purdze merged 3 commits into
masterfrom
shaderpack-particles
Nov 1, 2026
Merged

Purdze merged 3 commits into
masterfrom
shaderpack-particles

Conversation

@Purdze

@Purdze Purdze commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor / code cleanup
  • Performance improvement
  • Chore / tooling
  • Documentation

Summary

with a shader pack on, particles weren't drawn at all. they now go through gbuffers_particles (falling back to textured_lit) and gbuffers_particles_translucent (falling back to particles), as iris does: opaque particles before deferred, translucent ones after water and before composite, in the PARTICLES render stage.

gbuffers programs now end with iris's alpha test (CommonTransformer): a discard on gl_FragData[0]'s alpha, by the render type's ShaderKey threshold (0.1 for particles, block entities and most entities, just above zero for eyes, off for sky and terrain), or the pack's alphaTest.<program>. cutout terrain (0.5) and solid entity render types are TODOs, since pomme draws them in the same pass as their neighbours.

ParticlePipeline now builds its vertices once per frame (prepare) and draws them either through its own pipelines or one layer through the pack's program.

first of a stack for the missing pack programs (weather, clouds and hand next; glint waits for a glint pass).

Reference

n/a (iris: ProgramId, ShaderKey, IrisPipelines, MixinParticleEngine)

Testing

  • new world/shaderpack_particles: breaks a block and spawns end rods with the test pack, whose particle programs tint magenta and cyan in the particle stage, then the same with packs off. shots show each layer through its own program.
  • unit tests for the particle program's inputs, alpha test parsing and where the discard goes; the test pack's particle shader no longer discards, so the shots also show the injected test cutting the sprites out; world/shaderpack, entities/shaderpack_layers, world/deterministic and blocks/blocks still pass.
  • just shaderpack-corpus over complementary compiles all 69 programs; its particles draw shaded through its gbuffers_textured fallback.

@github-actions github-actions Bot added the enhancement New feature or request label Oct 31, 2026
@Purdze Purdze added the ready label Nov 1, 2026
@Purdze
Purdze merged commit 7dafaa6 into master Nov 1, 2026
13 checks passed
@Purdze
Purdze deleted the shaderpack-particles branch November 1, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant