📦 Culling Oklusi Entitas Blok (Minecraft 26.1.2)
Entitas blok (peti, ender chest, papan tanda, spanduk, tengkorak, pot berdekorasi, lonceng, dan suar) mengirimkan draw call individual setiap frame. Di ruang penyimpanan besar atau fasilitas penyortiran otomatis, hal ini menghasilkan beban perebutan draw call GPU yang berat.
📋 Informasi Singkat Culling Entitas Blok
| Properti | Nilai |
|---|---|
| Target Pipeline | BlockEntityRenderDispatcher.tryExtractRenderState(BlockEntity, float, CrumblingOverlay) (3 argumen) |
| Deteksi Pengurungan | Memeriksa ke-6 sisi tetangga: up, down, north, south, east, west |
| Mode Konservatif | Pemeriksaan hanya yang terkurung pada profil LOW |
| Mode Agresif | Verifikasi garis pandang raycast penuh pada MEDIUM, HIGH, SUPER |
| Hasil | Mengembalikan RenderState null untuk melewati pengiriman render |
🔍 Arsitektur Pengurungan & Verifikasi Garis Pandang
[ATAS]
│
[BARAT] ─── [PETI] ─── [TIMUR]
│
[BAWAH]1. Fast-Pass Pengurungan 6 Sisi Solid
Sebelum menjalankan perhitungan raycast apa pun, Camera Culling meminta status blok tetangga:
BlockState up = level.getBlockState(pos.above());
BlockState down = level.getBlockState(pos.below());
BlockState north = level.getBlockState(pos.north());
BlockState south = level.getBlockState(pos.south());
BlockState east = level.getBlockState(pos.east());
BlockState west = level.getBlockState(pos.west());
if (up.isSolidRender() && down.isSolidRender() && north.isSolidRender()
&& south.isSolidRender() && east.isSolidRender() && west.isSolidRender()) {
return true; // 100% Terhalang — lewati rendering
}Peti yang tertanam di balik dinding atau terkurung di dalam fondasi basement solid tidak akan di-render dengan kalkulasi CPU mendekati nol ($< 0.0001\mu\text{s}$).
2. Pemeriksaan Garis Pandang Raycast
Pada profil MEDIUM, HIGH, dan SUPER (cullAllBlockEntities = true), Camera Culling memproyeksikan sinar dari posisi kamera ke pusat entitas blok $(X + 0.5, Y + 0.5, Z + 0.5)$ untuk membatalkan render state yang terhalang.
