[PR #6530] [MERGED] HDR: light sources shine through a shader pack's material stage #6936

Closed
opened 2026-11-03 06:29:39 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6530
Author: @senjinthedragon
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: hdr-pack-marks


📝 Commits (2)

  • 863a9ea HDR: light sources shine through a shader pack's material stage
  • ce465c5 HDR: in a material stage too, a sprite that shines all over has no threshold

📊 Changes

2 files changed (+25 additions, -3 deletions)

View changed files

📝 crates/horizon-client-render/src/gfx/native_material.rs (+24 -2)
📝 docs/shaders.md (+1 -1)

📄 Description

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

What and why

Parts 1 and 2 of #3125. With a shader pack that has a material stage, no light source on terrain shone in HDR: the stage wrote alpha 1 into the frame, where fs_solid writes the mark. Particles and the sun still shone, so torches, lava and glowstone stood out as the only things missing it.

  • Material stage: horizon_material_fs_solid now writes the same mark as fs_solid, worked out from the sprite before the pack's material. The pack decides the colour, and Horizon still knows which pixels are light sources. A pack that tints a light source keeps that tint while it shines.
  • MaterialInput.emission: a tier that shines all over (code 5 and up, lava for one) was read as the top value. It now reads as its tier, as the comment there describes.
  • Docs: docs/shaders.md tells post passes to return input.color.a, which HDR output reads to find light sources.

Part 3 of #3125, an HDR output for packs, is an API design question and isn't in this PR. Nothing changes with HDR off: nothing reads the frame's alpha there.

Tested

In game on an AW3423DW, on Linux, with a small test pack whose only stage is a material that tints terrain green. The terrain turned green and torches, lava and glowstone kept shining, green too. With a material stage that matches vanilla, the picture looks the same with the pack on and off. pr_ready --quick passes.

Windows and macOS untested: testers welcome.

🤖 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/6530 **Author:** [@senjinthedragon](https://github.com/senjinthedragon) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `hdr-pack-marks` --- ### 📝 Commits (2) - [`863a9ea`](https://github.com/horizon-rust/horizon/commit/863a9eab0d30858a8eb48f7008d4d1419f11dcc8) HDR: light sources shine through a shader pack's material stage - [`ce465c5`](https://github.com/horizon-rust/horizon/commit/ce465c5708c92adf89daa2d6b26f7e8947e4e725) HDR: in a material stage too, a sprite that shines all over has no threshold ### 📊 Changes **2 files changed** (+25 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/gfx/native_material.rs` (+24 -2) 📝 `docs/shaders.md` (+1 -1) </details> ### 📄 Description > 🤖 Opened by senjinthedragon's AI agent (Claude Code, Claude Opus 5.5), not by senjinthedragon personally. ## What and why Parts 1 and 2 of #3125. With a shader pack that has a material stage, no light source on terrain shone in HDR: the stage wrote alpha 1 into the frame, where `fs_solid` writes the mark. Particles and the sun still shone, so torches, lava and glowstone stood out as the only things missing it. - **Material stage:** `horizon_material_fs_solid` now writes the same mark as `fs_solid`, worked out from the sprite before the pack's `material`. The pack decides the colour, and Horizon still knows which pixels are light sources. A pack that tints a light source keeps that tint while it shines. - **`MaterialInput.emission`:** a tier that shines all over (code 5 and up, lava for one) was read as the top value. It now reads as its tier, as the comment there describes. - **Docs:** `docs/shaders.md` tells post passes to return `input.color.a`, which HDR output reads to find light sources. Part 3 of #3125, an HDR output for packs, is an API design question and isn't in this PR. Nothing changes with HDR off: nothing reads the frame's alpha there. ## Tested In game on an AW3423DW, on Linux, with a small test pack whose only stage is a material that tints terrain green. The terrain turned green and torches, lava and glowstone kept shining, green too. With a material stage that matches vanilla, the picture looks the same with the pack on and off. `pr_ready --quick` passes. Windows and macOS untested: testers welcome. 🤖 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 06:29:39 +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#6936
No description provided.