Fix horse rendering: culling when looking up + fire debug texture#899
Merged
codeHusky merged 1 commit intosmartcmd:mainfrom Mar 8, 2026
Merged
Fix horse rendering: culling when looking up + fire debug texture#899codeHusky merged 1 commit intosmartcmd:mainfrom
codeHusky merged 1 commit intosmartcmd:mainfrom
Conversation
- Skip frustum culling for the entity the player is currently riding, preventing the horse from disappearing when looking up (fixes a bug reported on Discord) - Fix HorseRenderer::bindTexture() to delegate to base class for single textures (fire atlas, enchant glint), only using bindTextureLayers() for multi-layer horse textures
retroohmygod
pushed a commit
to retroohmygod/astrasmcfork
that referenced
this pull request
Mar 8, 2026
…artcmd#899) - Skip frustum culling for the entity the player is currently riding, preventing the horse from disappearing when looking up (fixes a bug reported on Discord) - Fix HorseRenderer::bindTexture() to delegate to base class for single textures (fire atlas, enchant glint), only using bindTextureLayers() for multi-layer horse textures Co-authored-by: MCbabel <MCbabel@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes two horse rendering issues: the horse model disappearing when looking up while riding, and a debug texture showing instead of the fire overlay when a horse is on fire.
Changes
Fix 1: Horse disappears when looking up while riding
Previous Behavior:
The horse model would vanish when the player looked up while riding it.
Root Cause:
LevelRenderer::renderEntities()had no frustum culling exception for the entity the player is currently riding. The horse AABB ends athorse.y + 1.6, but the camera sits athorse.y + 2.82. When looking up, the entire horse AABB falls below the frustum and gets culled.Fix:
Added an
isPlayerVehiclecheck that skips frustum culling for the entity the player is riding.Fix 2: Debug texture when horse is on fire
Previous Behavior:
When a horse, mule, or donkey was set on fire, it displayed a broken/debug texture instead of the normal fire overlay.
Root Cause:
HorseRenderer::bindTexture()unconditionally callsbindTextureLayers(), even for single textures like the fire atlas. This reads the raw terrain.png instead of the runtime texture atlas.Fix:
Modified
HorseRenderer::bindTexture()to checkgetTextureCount(). Multi-layer horse textures still usebindTextureLayers(), single textures delegate toEntityRenderer::bindTexture().Files Changed
Minecraft.Client/LevelRenderer.cpp- AddedisPlayerVehicleculling bypassMinecraft.Client/HorseRenderer.cpp- FixedbindTexture()delegationRelated Issues