-
Notifications
You must be signed in to change notification settings - Fork 0
26.2 Distance Texture LOD
Rendering full 1024x1024 or high-resolution textures on distant mobs that occupy only 4x4 pixels on the player's screen wastes significant GPU VRAM bandwidth and texture sampler cache lines.
Camera Culling includes a decoupled, 3-tier OpenGL Texture LOD Biasing Engine that dynamically adjusts texture mipmap sampling based on entity distance.
| Property | Value |
|---|---|
| Pipeline Hook |
LivingEntityRenderer.submit(...) @At("HEAD") & @At("RETURN")
|
| OpenGL Parameter | GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL14.GL_TEXTURE_LOD_BIAS, bias) |
| Near Threshold |
|
| Medium Threshold |
|
| Far Threshold |
|
| Exemptions | Glowing entities, local player, Bosses & Mini-Bosses, Blacklisted mobs |
Camera
│
├── [ 0m to 16m ] ──► Bias 0.0f (100% Native Full-Res Texture)
│
├── [ 16m to 32m ] ──► Bias 1.0f (50% Half-Res Mipmap Sampling)
│
└── [ > 32m ] ──────► Bias 2.5f (25% Low-Res Mipmap Sampling)
The LOD bias
When rendering a living entity, LivingEntityRendererMixin injects at submit:HEAD to apply the calculated bias, and immediately resets it to 0.0f at submit:RETURN. This guarantees that block models, items, and UI elements are never affected.
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