-
Notifications
You must be signed in to change notification settings - Fork 0
26.3 Entity Occlusion Culling
In Minecraft 26.3, the client entity rendering pipeline extracts render states (EntityRenderState) for all entities inside the camera frustumβeven if they are hidden behind mountains, thick stone walls, or underground dungeons. Camera Culling intercepts this check to prevent occluded mobs from consuming CPU geometry processing and GPU draw calls.
| Property | Value |
|---|---|
| Target Pipeline | EntityRenderer.shouldRender(T, Frustum, double, double, double) |
| Default Profile |
SUPER (Extreme) |
| Clip Context |
ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE
|
| Floor Filtering | Ignores Direction.UP hits when hit height |
| Leaves Occlusion | Solid render and BlockTags.LEAVES blocks occlude sightlines |
| Immunity Bubble | Distance squared |
Instead of a simplistic single-point raycast that causes mobs to pop in and out around corners, Camera Culling performs multi-point anatomical sampling based on the selected Culling Profile:
[1] Head Top (maxY - 0.05)
\
[2] Eye Position (entity.getEyeY())
\
[3] Upper Torso (minY + height * 0.70)
\
[4] Center of Mass (centerY)
\
[5-8] Elevated Perimeter Flanks (width/depth checks)
-
Sample 1: Top of Entity Head (
maxY - 0.05)- High priority check. Detects tall entities peeking over low barricades or fences.
-
Sample 2: Anatomical Eye Position (
getEyeY())- Direct line-of-sight from camera to mob eyes.
-
Sample 3: Upper Torso / Chest (
minY + height * 0.70)- Evaluates upper body sightlines safely above ground level.
-
Sample 4: Center of Mass (
(minY + maxY) * 0.5)- General geometric midpoint test.
-
Sample 5β8: Elevated Perimeter Flanks
- Evaluates
$(X_{\min} + 0.15, Z_{\min} + 0.15)$ ,$(X_{\max} - 0.15, Z_{\min} + 0.15)$ , etc. Ensures wide bosses (e.g. Ravagers, Wardens, Spiders) are visible when their shoulders emerge from behind corners.
- Evaluates
When a player looks downward at a mob standing on uneven terrain, a standard raycast can strike the top surface of a block near the mob's feet, falsely treating the floor as an occluding wall.
Camera Culling incorporates Directional Floor Hit Filtering:
This guarantees that mobs traversing hills, staircases, and irregular terrain are never erroneously culled.
In previous implementations, evaluating 8 sample points across 100 entities generated over 180,000 new Vec3() heap allocations per second, resulting in JVM Young-Gen garbage collection pauses.
In 26.3, CullingRaycastHelper passes raw primitive coordinates:
public static boolean hasLineOfSight(Level level, Vec3 from, double toX, double toY, double toZ)This architecture completely eliminates intermediate heap allocations on every frame.
Camera Culling Documentation β’ Part of the Vanilla Outsider Collection
Author: Dasik (Rifaditya) β’ Licensed under GNU General Public License v3.0 (GPLv3)
π Repository Source Disclaimer: The documentation in this Wiki reflects the current source code state in the repository, which may include recent unreleased commits ahead of public release builds on CurseForge/Modrinth.
- MC 26.3 Overview
- Entity Occlusion Culling
- Block Entity Culling
- Sign & Hanging Sign Culling
- Particle & Animation Culling
- Mob Crowd Overdraw Defense
- Distance Texture LOD
- Boss & Blacklist Immunity
- Temporal Hysteresis & Math
- Commands & Configuration
- GUI Configuration (YACL)
- Debug Tracing & Diagnostics
- Architecture & Mixins
- Developer Setup & Building
- API & Mod Integration
- MC 26.2 Overview
- Entity Occlusion Culling
- Block Entity Culling
- Sign & Hanging Sign Culling
- Particle & Animation Culling
- Mob Crowd Overdraw Defense
- Distance Texture LOD
- Boss & Blacklist Immunity
- Temporal Hysteresis & Math
- Commands & Configuration
- GUI Configuration (YACL)
- Debug Tracing & Diagnostics
- Architecture & Mixins
- Developer Setup & Building
- API & Mod Integration
- MC 26.1.2 Overview
- Entity Occlusion Culling
- Block Entity Culling
- Sign & Hanging Sign Culling
- Particle & Animation Culling
- Mob Crowd Overdraw Defense
- Distance Texture LOD
- Boss & Blacklist Immunity
- Temporal Hysteresis & Math
- Commands & Configuration
- GUI Configuration (YACL)
- Debug Tracing & Diagnostics
- Architecture & Mixins
- Developer Setup & Building
- API & Mod Integration