Skip to content

26.2 Entity Occlusion Culling

Dasik edited this page Aug 20, 2026 · 1 revision

🧱 Entity Occlusion Culling (Minecraft 26.2)

In Minecraft 26.2, client entity rendering extracts render states for all entities inside the camera frustum—even when obscured behind caves, cliffs, or builds. Camera Culling intercepts this check to prevent occluded mobs from consuming CPU geometry processing and GPU draw calls.


📋 Entity Culling Infobox

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 $\le Y + 0.15\text{m}$
Leaves Occlusion Solid render and BlockTags.LEAVES blocks occlude sightlines
Immunity Bubble Distance squared $< \text{minDistanceSq}$

🔬 Multi-Point Anatomical Sightline Sampling

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)
  1. Sample 1: Top of Entity Head (maxY - 0.05) — High priority check for tall mobs behind half-walls.
  2. Sample 2: Anatomical Eye Position (getEyeY()) — Direct line-of-sight from camera to eyes.
  3. Sample 3: Upper Torso / Chest (minY + height * 0.70) — Evaluates upper torso above ground-grazing range.
  4. Sample 4: Center of Mass ((minY + maxY) * 0.5) — Midpoint verification.
  5. Sample 5–8: Elevated Perimeter Flanks — Verifies wide mobs (Ravagers, Wardens, Spiders) peeking around corners.

🛡️ Directional Floor & Slope Filtering

When a player looks downward at a mob on uneven terrain, a standard raycast can strike the ground near the mob's feet: $$\text{If } \text{hit.getDirection()} == \text{Direction.UP} \quad \text{and} \quad Y_{\text{hit}} \le Y_{\text{target}} + 0.15\text{m} \implies \text{Valid Sightline (Not Blocked)}$$

This eliminates false-positive culling on slopes, hills, and steps.


⚡ Zero-Allocation Raycast Engine

In 26.2, 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.


🔗 Related Pages

Clone this wiki locally