COWMODSКаталог модов

CLab

Bringing Hardware Occlusion Culling (HOC) to Minecraft entity rendering optimization.

Автор: CipherXOR3,8 тыс.13обновлён 4 мая 2026 г.
Оптимизация

Описание

Bringing Hardware Occlusion Culling (HOC) to Minecraft entity rendering optimization.

CLab is a client-side rendering optimization mod. It leverages GPU OpenGL occlusion queries to determine entity visibility directly, eliminating the approximation errors and side effects inherent to traditional CPU-side pathtracing.

1

Core Features

  • Hardware Occlusion Culling (HOC)
    Uses GPU queries to test entity bounding boxes against the depth buffer, measuring real occlusion against actually rendered terrain rather than CPU-side approximations of the world model.

  • Zero False-Positive Culling
    Based on ground-truth depth buffer testing. An entity is never hidden if even a single pixel is visible. No whitelist needed, no per-mod patches required.

  • Render-Layer Only, Zero Intrusion
    Only decides whether to invoke the entity render method. Does not interfere with client-side ticks, animation states, position interpolation, or any logic. Trains, vehicles, and contraptions behave normally.

  • Built-in Leaf Face Culling
    Automatically culls leaf faces occluded by adjacent leaves, reducing terrain rendering overhead.

  • Zero-Config, Works Out of the Box
    No entity whitelist, no distance threshold, no tick-culling toggle. Install and play.

Technical Overview

CLab uses Hardware Occlusion Culling:

  1. During entity rendering, submit the entity bounding box to the GPU as an occlusion query (OpenGL Query).
  2. The GPU compares the bounding box against the already-rendered terrain depth buffer at the hardware level.
  3. Read the previous frame's query result: if no pixels passed the depth test, skip rendering this entity.

This creates a fundamental difference:

AspectCPU PathtracingCLab HOC
Occlusion basisSimplified assumptions about world modelActual GPU-rendered depth buffer
False positives (hiding visible entities)Common (near non-solid blocks)Extremely unlikely
Entity tick/animationOften frozen or skippedCompletely unaffected
CPU overheadContinuous background traversalRender thread submits AABB only; GPU handles the rest asynchronously
Configuration requiredWhitelists, distance limits, thresholds as compensatory mechanismsNone required

⚠️ Important Compatibility Notes

  • Hardware Requirement: CLab requires a dedicated graphics card with OpenGL 3.3 or higher. Most modern GPUs meet this requirement, but certain older integrated graphics or outdated drivers may not.
  • Do NOT use with other entity culling mods: CLab should not be installed alongside EntityCulling or any other mod that modifies entity/block entity visibility. While these mods use different techniques, they all ultimately override the same visibility decisions. Running more than one will not improve performance — instead, they may conflict and cancel out each other's optimizations, resulting in wasted resources and potential visual inconsistencies. For the best results, keep only CLab active.

Compatibility & Future Optimizations

The current approach was chosen to maintain compatibility with older devices and macOS. A more advanced technique is available, but it would introduce compatibility problems on those systems. Development and testing are currently done on a Mac, which limits how far I can improve things today. I plan to transition to a machine with OpenGL 4.6 support soon, after which I’ll introduce a system that automatically selects the optimal method during loading.

Галерея

EntityCulling vs CLab

Последние версии

Все версии →
beta

CLab 26.3.1

26.3.1
4 мая 2026 г.1,7 тыс.Minecraft: 1.20, 1.20.1forge, neoforge
Скачать
Что нового
feat(renderer): add hardware occlusion culling for block entities - Implemented HardwareOcclusionBlockEntityCuller with OpenGL query-based visibility detection - Added BlockEntityCullingManager to handle registration and culling logic for block entities - Integrated block entity culling into rendering pipeline via MixinBlockEntityRenderDispatcher - Enhanced MixinLevelRenderer to process block entity queries after rendering phase - Added support for distance-based query frequency adjustment and result batching - Implemented proper resource management with query pool growth and cleanup routines - Updated ClientClass to initialize and manage block entity culling system alongside entity culling
beta

CLab 26.3.1

26.3.1
4 мая 2026 г.322Minecraft: 1.20, 1.20.1fabric, quilt
Скачать
Что нового
feat(renderer): add hardware occlusion culling for block entities - Implemented HardwareOcclusionBlockEntityCuller with OpenGL query-based visibility detection - Added BlockEntityCullingManager to handle registration and culling logic for block entities - Integrated block entity culling into rendering pipeline via MixinBlockEntityRenderDispatcher - Enhanced MixinLevelRenderer to process block entity queries after rendering phase - Added support for distance-based query frequency adjustment and result batching - Implemented proper resource management with query pool growth and cleanup routines - Updated ClientClass to initialize and manage block entity culling system alongside entity culling
beta

CLab 26.3.1

26.3.1
4 мая 2026 г.1,2 тыс.Minecraft: 1.21, 1.21.1neoforge
Скачать
Что нового
perf(culling): optimize hardware occlusion culling implementation - Increased initial query pool size from 512 to 1024 for better performance - Added shader caching mechanism to reduce redundant shader operations - Implemented matrix caching for projection and model-view transformations - Replaced direct shader drawing with optimized draw calls - Removed redundant imports and cleaned up code structure - Moved block entity culling logic to separate mixin class - Added proper shader matrix updates during query batches - Implemented resource cleanup in endQueryBatch methods
beta

CLab 26.3.1

26.3.1
4 мая 2026 г.398Minecraft: 1.21, 1.21.1fabric, quilt
Скачать
Что нового
perf(culling): optimize hardware occlusion culling implementation - Increased initial query pool size from 512 to 1024 for better performance - Added shader caching mechanism to reduce redundant shader operations - Implemented matrix caching for projection and model-view transformations - Replaced direct shader drawing with optimized draw calls - Removed redundant imports and cleaned up code structure - Moved block entity culling logic to separate mixin class - Added proper shader matrix updates during query batches - Implemented resource cleanup in endQueryBatch methods
beta

CLab 26.3

26.3
3 мая 2026 г.16Minecraft: 1.21, 1.21.1neoforge
Скачать
Что нового
feat(rendering): add hardware occlusion culling for block entities - Implemented HardwareOcclusionBlockEntityCuller with OpenGL query-based visibility detection - Added BlockEntityCullingManager to handle registration and management of block entity cullers - Integrated block entity culling into LevelRenderer with proper mixin injections and redirects - Created IBlockEntityCuller interface for standardized culling implementation - Optimized rendering by caching camera position and using batched queries - Added proper resource cleanup and pool management for GPU queries
beta

CLab 26.3

26.3
3 мая 2026 г.40Minecraft: 1.21, 1.21.1fabric, quilt
Скачать
Что нового
feat(rendering): add hardware occlusion culling for block entities - Implemented HardwareOcclusionBlockEntityCuller with OpenGL query-based visibility detection - Added BlockEntityCullingManager to handle registration and management of block entity cullers - Integrated block entity culling into LevelRenderer with proper mixin injections and redirects - Created IBlockEntityCuller interface for standardized culling implementation - Optimized rendering by caching camera position and using batched queries - Added proper resource cleanup and pool management for GPU queries
beta

CLab 26.2

26.2
2 мая 2026 г.21Minecraft: 1.21, 1.21.1neoforge
Скачать
beta

CLab 26.2

26.2
2 мая 2026 г.20Minecraft: 1.21, 1.21.1fabric, quilt
Скачать
beta

CLab 26.2

26.2
2 мая 2026 г.25Minecraft: 1.20, 1.20.1forge, neoforge
Скачать
beta

CLab 26.2

26.2
2 мая 2026 г.23Minecraft: 1.20, 1.20.1fabric, quilt
Скачать