[PR #4909] [MERGED] Improved transparency: entity render types with an OIT pipeline set #5936

Closed
opened 2026-11-03 05:16:03 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4909
Author: @levzzz5154
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @levzzz5154

Base: main ← Head: parity/B3-oit-entities


📝 Commits (1)

  • 1b4ef1d Improved transparency: entity render types with an OIT pipeline set

📊 Changes

8 files changed (+197 additions, -35 deletions)

View changed files

📝 crates/horizon-client-render/src/entity.wgsl (+1 -1)
📝 crates/horizon-client-render/src/gfx.rs (+41 -23)
📝 crates/horizon-client-render/src/gfx/entity_batch.rs (+54 -7)
📝 crates/horizon-client-render/src/gfx/oit_features.rs (+31 -0)
📝 crates/horizon-client-render/src/gfx/pack_entities.rs (+10 -4)
📝 crates/horizon-client-render/src/oit_features.wgsl (+13 -0)
📝 crates/horizon-client/src/game/wind.rs (+5 -0)
📝 crates/horizon-client/src/mobs/render.rs (+42 -0)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally.

Part of #3519

Follows #4850, #4883 and #4897. Option off: unchanged (same draws, same order).

Rows

  • LevelRenderer.executeOit (entities): with Improved transparency on, the entity render types vanilla gives an OitPipelineSet now draw in the three stages instead of the solid entity pass:
    • OIT_ENTITY (RenderTypes.entityTranslucent): the slime's outer cube, the sulfur cube, and the bodies of models built with RenderTypes::entityTranslucent (Model.renderType: allay, piglins, breeze, vex, player/mannequin), horse markings.
    • OIT_ENTITY_EMISSIVE / OIT_EYES (entityTranslucentEmissive, eyes): spider, enderman, phantom, creaking, copper golem, breeze eyes and the warden's layers.
    • OIT_BREEZE_WIND (breezeWind): the breeze's wind layer and the wind charge.
    • OIT_LIGHTNING / OIT_DRAGON_RAYS: lightning bolts and the dragon's additive geometry (additive kind, like the swirl).
  • See-through text keeps its classic draw: vanilla gives textSeeThrough no OIT pipeline set.

How

  • The mob renderer tags those quads with a Vertex::layer bit (OIT_ENTITY, above the overlay and HDR tier bits). EntityBatch puts tagged quads in a last material only when the option is on; off, the tag is ignored and they keep their place. The shader masks the HDR tier, the shader-pack path masks the tag.
  • The classic fragment colour is reused (light and shading are in the vertices, as for the other kinds), so the defines of the vanilla variants (EMISSIVE, NO_OVERLAY, APPLY_TEXTURE_MATRIX) need no extra shader code.

Left classic / not done

  • Entities drawn elsewhere than the mob renderer and wind charge (experience orbs, shulker bullets, armor stands, skulls, the first-person hand, the elytra/cape layers of players) are not tagged yet.
  • The dragon's eyes share the additive buffer with the rays, so they draw additive as in the classic path, not as OIT_EYES.
  • With HDR output on, eyes drawn in the stages do not get the HDR shine mark.

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

LevelRenderer.executeOit, SubmitNodeCollection.submitModel and the improved transparency phases, RenderTypes (entityTranslucent, entityTranslucentCull, entityTranslucentEmissive, eyes, breezeWind, lightning, dragonRays), RenderPipelines.OIT_ENTITY*, OIT_EYES, OIT_BREEZE_WIND, OIT_LIGHTNING, OIT_DRAGON_RAYS, LivingEntityRenderer.getRenderType.

Self-check

fmt, clippy -p horizon-client-render -p horizon-client --all-targets -D warnings, test -p horizon-client-render --lib (new entity_batch test: tagged quads stay in place off, go last on; shader validation tests cover the new fragments). Checked in the game (offscreen, fast build): stained glass with slimes, spiders, an enderman and a piglin in front of and behind it, option off and on; both render, eyes and slime visible through the glass, no validation errors.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/4909 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/B3-oit-entities` --- ### 📝 Commits (1) - [`1b4ef1d`](https://github.com/horizon-rust/horizon/commit/1b4ef1de92c210c1efcbd31ad049fb8dba74fa47) Improved transparency: entity render types with an OIT pipeline set ### 📊 Changes **8 files changed** (+197 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/entity.wgsl` (+1 -1) 📝 `crates/horizon-client-render/src/gfx.rs` (+41 -23) 📝 `crates/horizon-client-render/src/gfx/entity_batch.rs` (+54 -7) 📝 `crates/horizon-client-render/src/gfx/oit_features.rs` (+31 -0) 📝 `crates/horizon-client-render/src/gfx/pack_entities.rs` (+10 -4) 📝 `crates/horizon-client-render/src/oit_features.wgsl` (+13 -0) 📝 `crates/horizon-client/src/game/wind.rs` (+5 -0) 📝 `crates/horizon-client/src/mobs/render.rs` (+42 -0) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3519 Follows #4850, #4883 and #4897. Option off: unchanged (same draws, same order). ## Rows - `LevelRenderer.executeOit` (entities): with Improved transparency on, the entity render types vanilla gives an `OitPipelineSet` now draw in the three stages instead of the solid entity pass: - `OIT_ENTITY` (`RenderTypes.entityTranslucent`): the slime's outer cube, the sulfur cube, and the bodies of models built with `RenderTypes::entityTranslucent` (`Model.renderType`: allay, piglins, breeze, vex, player/mannequin), horse markings. - `OIT_ENTITY_EMISSIVE` / `OIT_EYES` (`entityTranslucentEmissive`, `eyes`): spider, enderman, phantom, creaking, copper golem, breeze eyes and the warden's layers. - `OIT_BREEZE_WIND` (`breezeWind`): the breeze's wind layer and the wind charge. - `OIT_LIGHTNING` / `OIT_DRAGON_RAYS`: lightning bolts and the dragon's additive geometry (additive kind, like the swirl). - See-through text keeps its classic draw: vanilla gives `textSeeThrough` no OIT pipeline set. ## How - The mob renderer tags those quads with a `Vertex::layer` bit (`OIT_ENTITY`, above the overlay and HDR tier bits). `EntityBatch` puts tagged quads in a last material only when the option is on; off, the tag is ignored and they keep their place. The shader masks the HDR tier, the shader-pack path masks the tag. - The classic fragment colour is reused (light and shading are in the vertices, as for the other kinds), so the defines of the vanilla variants (EMISSIVE, NO_OVERLAY, APPLY_TEXTURE_MATRIX) need no extra shader code. ## Left classic / not done - Entities drawn elsewhere than the mob renderer and wind charge (experience orbs, shulker bullets, armor stands, skulls, the first-person hand, the elytra/cape layers of players) are not tagged yet. - The dragon's eyes share the additive buffer with the rays, so they draw additive as in the classic path, not as `OIT_EYES`. - With HDR output on, eyes drawn in the stages do not get the HDR shine mark. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference `LevelRenderer.executeOit`, `SubmitNodeCollection.submitModel` and the improved transparency phases, `RenderTypes` (`entityTranslucent`, `entityTranslucentCull`, `entityTranslucentEmissive`, `eyes`, `breezeWind`, `lightning`, `dragonRays`), `RenderPipelines.OIT_ENTITY*`, `OIT_EYES`, `OIT_BREEZE_WIND`, `OIT_LIGHTNING`, `OIT_DRAGON_RAYS`, `LivingEntityRenderer.getRenderType`. ## Self-check fmt, `clippy -p horizon-client-render -p horizon-client --all-targets -D warnings`, `test -p horizon-client-render --lib` (new `entity_batch` test: tagged quads stay in place off, go last on; shader validation tests cover the new fragments). Checked in the game (offscreen, fast build): stained glass with slimes, spiders, an enderman and a piglin in front of and behind it, option off and on; both render, eyes and slime visible through the glass, no validation errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:16:03 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5936
No description provided.