[PR #3053] [MERGED] Draw entity shadows in dim light like vanilla #4769

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3053
Author: @kacpherek
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: fix/entity-shadows-no-cutout


📝 Commits (2)

  • 0e03cac Draw faint entity shadows instead of cutting them out
  • 012a3cf Use the End's ambient light for entity shadows

📊 Changes

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

View changed files

📝 crates/horizon-client/src/entity.wgsl (+10 -0)
📝 crates/horizon-client/src/game.rs (+6 -1)
📝 crates/horizon-client/src/gfx.rs (+3 -1)

📄 Description

What and why

  • A player said shadows look weaker than in vanilla. The round shadows under mobs, items and orbs were the cause:
    • The shadow pipeline used fs_entity, which discards fragments with alpha under 0.1. A shadow's alpha is 0.5 * power * brightness, so at light 7 and below it never drew, and in brighter light it disappeared after a few blocks (about 5 blocks at light 8, about 14 at light 15). The soft edge texels were cut too, so the blob was smaller with a hard rim. rendertype_entity_shadow.fsh has no cutout: the texture times the vertex colour, then fog. Shadows now use a fs_entity_shadow entry that does the same.
    • In the End, shadows used an ambient light of 0, but the_end.json says 0.25.
  • Block shading, AO, the lightmap and the entity lighting were checked against 26.3 and already match.

Vanilla reference

assets/minecraft/shaders/core/rendertype_entity_shadow.fsh (no discard), EntityRenderer.java:285-335 (shadow alpha), data/minecraft/dimension_type/the_end.json (ambient_light: 0.25).

Self-check

fmt passes. Built and tested by this pull request's checks. Not run in game.


🔄 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/3053 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/entity-shadows-no-cutout` --- ### 📝 Commits (2) - [`0e03cac`](https://github.com/horizon-rust/horizon/commit/0e03cac3685af239e6491784a5ee3ca9a4390fb8) Draw faint entity shadows instead of cutting them out - [`012a3cf`](https://github.com/horizon-rust/horizon/commit/012a3cf9081f901dd6aa46142baafe4053ef3752) Use the End's ambient light for entity shadows ### 📊 Changes **3 files changed** (+19 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entity.wgsl` (+10 -0) 📝 `crates/horizon-client/src/game.rs` (+6 -1) 📝 `crates/horizon-client/src/gfx.rs` (+3 -1) </details> ### 📄 Description ## What and why - A player said shadows look weaker than in vanilla. The round shadows under mobs, items and orbs were the cause: - The shadow pipeline used `fs_entity`, which discards fragments with alpha under 0.1. A shadow's alpha is `0.5 * power * brightness`, so at light 7 and below it never drew, and in brighter light it disappeared after a few blocks (about 5 blocks at light 8, about 14 at light 15). The soft edge texels were cut too, so the blob was smaller with a hard rim. `rendertype_entity_shadow.fsh` has no cutout: the texture times the vertex colour, then fog. Shadows now use a `fs_entity_shadow` entry that does the same. - In the End, shadows used an ambient light of 0, but `the_end.json` says 0.25. - Block shading, AO, the lightmap and the entity lighting were checked against 26.3 and already match. ## Vanilla reference `assets/minecraft/shaders/core/rendertype_entity_shadow.fsh` (no discard), `EntityRenderer.java:285-335` (shadow alpha), `data/minecraft/dimension_type/the_end.json` (`ambient_light: 0.25`). ## Self-check fmt passes. Built and tested by this pull request's checks. Not run in game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:47 +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#4769
No description provided.