📷 Camera Culling
活跃版本策略: 我为每个版本构建 1 个 JAR 文件。我支持活跃的 Minecraft 版本锚点:1.20.1、1.21.1、1.21.11 以及现代主权(Modern Sovereign)版本 26.1.2、26.2 和 26.3+。每个版本均原生编译,毫无妥协。
隐藏不可见之物。轻量级、零分配的相机遮挡剔除、双面告示牌文本剔除及基于距离的实体细节 LOD。
原版问题: 在原版 Minecraft 中,游戏渲染器会提取渲染状态并绘制数千个实体、方块实体、粒子四边形和告示牌文本字形,即使它们被实心墙壁遮挡、位于洞穴地下或处于你的视野之外。此外,为远处的生物渲染完全解析的次要模型层会消耗宝贵的 GPU 填充率和内存带宽。
Camera Culling 从渲染根源解决此问题。它在客户端执行极快的光线投射和视锥体遮挡检查,针对方块碰撞进行动态剔除被遮挡的实体、方块实体、粒子和告示牌面。结合智能的人群重叠防御、基于距离的实体细节与阴影 LOD、动态 Boss/小 Boss 保护、每帧零堆分配以及抗闪烁的时间滞后缓冲区,Camera Culling 在不改变世界模拟或网络数据包的情况下大幅提升帧率。
属于 Vanilla Outsider Collection —— 以现代标准完善原版体验的模组合集。
🔗 官方 GitHub Wiki:
✨ 主要功能
🧱 实体遮挡剔除(零分配光线投射引擎)
永远不要浪费 GPU 周期去渲染你看不到的生物。通过对实心方块碰撞几何体进行快速多点光线追踪,剔除隐藏在墙壁、洞穴天花板和地形后的实体。
- 零分配热路径引擎:直接传递原始坐标消除了连续帧渲染期间中间
Vec3 堆分配,消除了当视角扫过密集兽群时的 JVM 年轻代垃圾回收卡顿峰值。
- 多点精度:评估关键实体视线(头顶、解剖学眼高、上躯干、质心和高耸侧面),确保在角落部分可见时实体不会被过早剔除。
- 方向性地面过滤:忽略实体基座级别向上的方块法线碰撞(
Direction.UP),防止在斜坡和山丘上因地面贴地而产生错误的剔除。
- 近距离安全边际:在你近距离的安全气泡内的生物始终平滑渲染,无延迟。
[!NOTE]
零模拟影响:剔除操作严格仅在客户端渲染提交层面运行。实体刻钟、服务器同步、声音事件和物理效果保持 100% 活跃。
🛡️ 抗闪烁时间滞后机制
- 距离缩放缓冲期:实现自适应帧去抖衰减(近处 $\le 32\text{m}$ 4 帧,中距离 $32-64\text{m}$ 8 帧,远处 $> 64\text{m}$ 12 帧),吸收相机旋转和行走视角抖动,避免突然弹出。
- 即时取消剔除:一旦单个视线样本连接,变为可见的生物将立即渲染,0 帧延迟。
🪧 双面告示牌及悬挂告示牌背面文本剔除
带有双面文字的告示牌会同时渲染两面的字体字形、字距表和发光轮廓——即使你只看着其中一面。
- 法向量点积数学计算:计算墙式告示牌、立式告示牌、天花板悬挂告示牌和墙面悬挂告示牌的面法向量,自动跳过背对相机的那一面的字体渲染过程。
- 空白面快速通道:自动检测空白/未书写的告示牌面,并以零数学开销立即跳过文本布局。
- 存储仓库和多玩家城镇中的告示牌绘制调用减少 50% 至 100%。
✨ 粒子与动画遮挡剔除
- 粒子遮挡:使用围绕玩家相机 4.0 米的安全气泡,对 QuadParticle 视线进行视觉碰撞形状的光线投射。
- TextureAtlas 动画冻结:暂停游戏或打开模态菜单时,冻结 3D 方块动画并跳过屏幕外的纹理图集帧循环。
👥 实体后实体剔除(人群重叠防御)
密集的刷怪笼和拥挤的围栏是 FPS 杀手。Camera Culling 检测当生物完全被前方更近的不透明生物遮挡时的情况。
- 集群密度上限:自动限制紧密 1.5 格集群中的渲染实体数量(默认:每集群 8 个生物),防止在拥挤农场中产生渲染延迟。
- 16 米距离快速失败:完全绕过 16 米以外的群体查询,确保在大片开阔田野兽群中零 CPU 开销。
- 装饰性与小型生物旁路:透明或小体型实体(史莱姆、岩浆怪、恼鬼、盔甲架、物品展示框)永远不会阻挡视线或遮挡其他生物。
🎨 实体细节与阴影 LOD
远处的实体不需要完全精细的外层模型或厚重的投影。Camera Culling 配备了一个解耦的距离细节引擎:
- 次要渲染层剔除:自动跳过在配置 LOD 距离(默认:32.0m)之外的生物实体的次要模型层(盔甲覆盖层、配饰、微小附件)。
- 距离缩放阴影淡出:在起始距离(32m)和远距离(48m)之间平滑地缩放并淡化实体阴影半径,完全剔除远处实体的阴影以减少阴影四边形绘制开销。
- 豁免项:玩家、发光实体、Boss、小 Boss 以及黑名单中的实体完全不受细节 LOD 降级的影响。
🛡️ 双层实体免疫黑名单
希望特定实体在任何情况下都不被剔除?Camera Culling 提供了强大的双层黑名单系统:
- 客户端个人黑名单:存储在本地
config/camera-culling.json 中。你可以将喜欢的同伴加入黑名单(例如 minecraft:wolf、minecraft:allay、minecraft:cat)。
- 服务器管理员黑名单:在
config/camera-culling-server.json 中配置。服务器操作员可以为所有连接客户端强制执行全服实体免疫。
- 完全免疫:被列入黑名单的实体 100% 免于方块遮挡剔除、群体重叠剔除和细节 LOD 降级。
👑 动态 Boss 与小 Boss 免疫
永远不要丢失危险敌人的踪迹。Camera Culling 会自动识别原版和模组添加的 Boss 及小 Boss:
- 自动识别:保护末影龙、凋灵、监守者、远古守卫者、劫掠兽、铁傀儡、猪灵蛮兵、唤魔者、旋风人以及模组的冠军/泰坦级实体。
- 可配置的生命值阈值:
- 主要 Boss 阈值:
bossHealthThreshold(默认:150.0 HP / 75颗心)。
- 小 Boss 阈值:
miniBossHealthThreshold(默认:50.0 HP / 25颗心)。
- 绝对视线保护:Boss 和小 Boss 永远不会因位于实心方块后方而被剔除,不会因为群体上限而被剔除,也不会因细节 LOD 而降低精度。
📦 方块实体遮挡剔除
跳过对完全被包裹或被遮挡的方块实体的渲染提取:
- 包围检查:自动停止渲染那些在所有 6 个面都被实心不透明方块完全包围的箱子、告示牌、旗帜、头颅和装饰花瓶。
- 视线检查:在激进剔除配置文件中,当从摄像机视角被阻挡时跳过渲染。
⚙️ 4 种剔除强度配置文件
- LOW(保守):5.0m 缓冲区,7 点采样,填充碰撞箱。
- MEDIUM(平衡):3.5m 缓冲区,5 点采样,剔除所有方块实体。
- HIGH(激进):3.0m 缓冲区,3 点采样,激进的方块实体剔除,装饰性实体剔除。
- SUPER(极端 - 默认):2.0m 缓冲区,超快速 2 点检查,在现代系统上实现最大 FPS。
📋 快速命令参考
所有设置都可以通过游戏内的 /cameraculling 命令套件进行查看和调整:
/cameraculling status → 查看实时统计信息、当前级别和阈值
/cameraculling toggle → 开启或关闭剔除功能
/cameraculling set <low|medium|high|super> → 更改剔除强度预设
/cameraculling particles [true|false] → 切换粒子遮挡剔除
/cameraculling animations [true|false] → 切换方块与纹理动画剔除
/cameraculling crowdculling <true|false> → 切换群体重叠 / 实体挡实体剔除
/cameraculling cluster <1-128> → 设置密集畜栏的集群密度上限(默认:8)
/cameraculling entitylod [true|false] → 切换实体细节与次要层级 LOD
/cameraculling entitylod distance <4.0-256.0> → 设置实体细节 LOD 距离阈值(默认:32.0m)
/cameraculling texturlod <true|false> → 实体细节 LOD 切换的别名
/cameraculling bossimmunity <true|false> → 切换 Boss 与小 Boss 免疫
/cameraculling bosshealth <boss_hp> [miniboss_hp] → 设置主要 Boss 生命值阈值(默认:150.0 HP)
/cameraculling minibosshealth <miniboss_hp> → 设置小 Boss 生命值阈值(默认:50.0 HP)
/cameraculling blacklist add <entity_id> → 将实体添加到个人客户端免疫列表(例如 minecraft:wolf)
/cameraculling blacklist remove <entity_id> → 从个人免疫列表中移除实体
/cameraculling blacklist list → 列出所有个人黑名单实体
/cameraculling blacklist clear → 清除个人免疫黑名单
/cameraculling serverblacklist add <entity_id> → 将实体添加到服务器管理员免疫列表
/cameraculling serverblacklist remove <entity_id> → 从服务器管理员免疫列表中移除实体
/cameraculling serverblacklist list → 列出所有服务器黑名单实体
/cameraculling serverblacklist clear → 清除服务器管理员黑名单
/cameraculling debug [true|false] → 在游戏聊天和日志中切换实时诊断追踪
/cameraculling reload → 从磁盘重新加载配置
⚙️ 配置文件
设置直接保存到 config/camera-culling.json:
{
"enabled": true,
"level": "SUPER",
"cullEntitiesBehindEntities": false,
"maxEntitiesPerCluster": 8,
"entityDetailLod": true,
"entityLodDistance": 32.0,
"bossImmunity": true,
"bossHealthThreshold": 150.0,
"miniBossHealthThreshold": 50.0,
"cullParticles": true,
"cullAnimations": true,
"cullSignText": true,
"clientBlacklist": [],
"debugMode": false
}
📦 安装与环境
⚛️ 环境支持
- 仅客户端:所有功能均在客户端完成,兼容原版服务器。
- 仅服务端:仅限服务器安装。
- 客户端和服务端:需要在两端都进行安装。
📥 安装说明
- 安装 Fabric API。
- (可选)安装 ModMenu 和 YetAnotherConfigLib 以启用游戏内图形设置界面。
- 下载与你 Minecraft 版本对应的最新 Camera Culling JAR 文件,并将其放入
.minecraft/mods 文件夹中。
- 启动 Minecraft,享受流畅、优化的帧率吧!
☕ 支持
如果你喜欢 Camera Culling 以及 Vanilla Outsider 的理念,请考虑为下一次更新提供动力!
📜 致谢
| 角色 |
作者 |
| 创作者 |
Dasik (Rifaditya) |
| 合集 |
Vanilla Outsider |
| 许可证 |
GNU GPLv3 |
[!IMPORTANT]
📦 整合包权限与分发:
你完全可以将此模组包含在任何平台的任何整合包中!但是,模组文件必须通过官方分发渠道(Modrinth 或 CurseForge)直接下载。严禁将原始模组 JAR 文件重新上传、镜像或分发到第三方镜像站点、爬虫门户或未授权的启动器上。
⚖️ 许可证与分支指南(禁止零变更的重新上传):
本项目基于 GNU GPLv3 开源。我们鼓励你查看代码、从中学习,并 Fork 仓库以创建真正的修改、重大功能扩展或社区移植版——前提是该项目继续以 GPLv3 许可开源,并正确署名。
然而,严格禁止直接的 1:1 重新上传、没有任何实质功能变化的克隆分支,或以不同项目名称重新发布相同构建版本(例如为了刷取下载量或奖励)。
用 ❤️ 为 Minecraft 社区打造
属于 Vanilla Outsider 合集的一部分
📷 Camera Culling
Active Version Policy: I build 1 JAR for 1 Version. I support active Minecraft version anchors: 1.20.1, 1.21.1, 1.21.11, and Modern Sovereign 26.1.2, 26.2, and 26.3+. Each version is compiled natively with zero compromises.
Unrender the unseen. Lightweight, zero-allocation camera occlusion culling, 2-sided sign text culling & distance entity detail LOD.
The Vanilla Problem: In vanilla Minecraft, the game's renderer extracts render states and draws thousands of entities, block entities, particle quads, and sign text glyphs even when they are hidden behind solid walls, underground in caves, or obscured from your field of view. Furthermore, rendering fully-resolved secondary model layers on distant mobs consumes precious GPU fillrate and memory bandwidth.
Camera Culling solves this at the rendering root. It performs lightning-fast client-side raycasting and frustum occlusion checks against block collisions to dynamically unrender occluded entities, block entities, particles, and sign text faces. Combined with a smart crowd overdraw defense, distance-based entity detail & shadow LOD, dynamic boss/mini-boss protections, zero per-frame heap allocations, and an anti-flicker temporal hysteresis buffer, Camera Culling drastically increases frame rates without altering world simulation or network packets.
Part of the Vanilla Outsider Collection — mods that refine the vanilla experience with modern standards.
🔗 Official GitHub Wiki:
✨ Key Features
🧱 Entity Occlusion Culling (Zero-Allocation Raycast Engine)
Never waste GPU cycles rendering mobs you cannot see. Fast multi-point raytracing against solid block collision geometry unrenders entities hidden behind walls, cave ceilings, and terrain.
- Zero-Allocation Hot-Path Engine: Passing primitive coordinates directly eliminates intermediate
Vec3 heap allocations during continuous frame rendering, removing JVM Young-Gen garbage collection stutter spikes when panning across dense herds.
- Multi-Point Precision: Evaluates key entity sightlines (head top, anatomical eye height, upper torso, center of mass, and elevated flanks) to guarantee mobs are never culled prematurely when partially visible around corners.
- Directional Floor Filtering: Ignores upward block normal collisions (
Direction.UP) at entity base level, preventing ground-grazing false culling on slopes and hills.
- Proximity Safety Margin: Mobs within your close proximity safety bubble are always rendered smoothly without delay.
[!NOTE]
Zero Simulation Impact: Culling operates strictly on client-side render submission. Entity ticks, server synchronization, sound events, and physics remain 100% active.
🛡️ Anti-Flicker Temporal Hysteresis
- Distance-Scaled Grace Buffer: Implements an adaptive frame debounce decay (4 frames near $\le 32\text{m}$, 8 frames medium $32-64\text{m}$, 12 frames far $> 64\text{m}$) that absorbs camera rotation and walking view-bobbing jitter without sudden pop-in.
- Instant Unculling: Mobs becoming visible are rendered immediately with 0-frame latency as soon as a single sightline sample connects.
🪧 2-Sided Sign & Hanging Sign Back-Face Text Culling
Signs with text on both sides render font glyphs, kerning tables, and glow outlines on both faces simultaneously—even when looking at only one side.
- Normal Vector Dot-Product Math: Calculates the sign face normal vector across Wall Signs, Standing Signs, Ceiling Hanging Signs, and Wall Hanging Signs to automatically skip font rendering passes for whichever side faces away from the camera.
- Empty-Side Fast-Pass: Automatically detects blank/unwritten sign faces and skips text layout immediately with zero math overhead.
- 50% to 100% Draw Call Reduction on signs in storage warehouses and multiplayer towns.
✨ Particle & Animation Occlusion Culling
- Particle Occlusion: Raycasts QuadParticle sightlines against visual collision shapes with a 4.0-meter proximity safety bubble around the player's camera.
- TextureAtlas Animation Freezing: Freezes 3D block animations and skips off-screen texture atlas frame cycling when the game is paused or modal menus are open.
👥 Entity-Behind-Entity Culling (Crowd Overdraw Defense)
Dense mob farms and crowded pens are major FPS killers. Camera Culling detects when mobs are completely obscured behind closer, opaque mobs in front of them.
- Cluster Density Cap: Automatically caps rendered entities in tight 1.5-block clusters (default: 8 mobs per cluster), preventing rendering lag in cramming farms.
- 16-Meter Distance Fast-Fail: Completely bypasses crowd queries beyond 16 meters, ensuring zero CPU overhead in large open-field herds.
- Decorative & Small Mob Bypass: Transparent or small entities (Slimes, Magma Cubes, Vexes, Armor Stands, Item Frames) never block sightlines or occlude other mobs.
🎨 Entity Detail & Shadow LOD
Distant mobs don't need fully articulated outer model layers or heavy drop-shadows. Camera Culling features a decoupled distance detail engine:
- Secondary Render Layer Culling: Automatically skips secondary model layers (armor overlays, accessories, micro-attachments) on living entities beyond the configured LOD distance (default: 32.0m).
- Distance-Scaled Shadow Fade: Smoothly scales and fades entity shadow radii between start distance (32m) and far distance (48m), completely culling shadows on distant entities to reduce shadow quad draw overhead.
- Exemptions: Players, glowing entities, bosses, mini-bosses, and blacklisted mobs are completely exempt from detail LOD downscaling.
🛡️ Two-Tier Entity Immunity Blacklist
Want specific entities to never be culled under any circumstances? Camera Culling provides a robust two-tier blacklist system:
- Client Personal Blacklist: Stored locally in
config/camera-culling.json. You can blacklist your favorite companions (e.g. minecraft:wolf, minecraft:allay, minecraft:cat).
- Server Admin Blacklist: Configured in
config/camera-culling-server.json. Server operators can enforce server-wide entity immunity across all connected clients.
- Full Immunity: Blacklisted entities are 100% exempt from block occlusion culling, crowd overdraw culling, and detail LOD downscaling.
👑 Dynamic Boss & Mini-Boss Immunity
Never lose sight of dangerous foes. Camera Culling automatically identifies both vanilla and modded bosses & mini-bosses:
- Automatic Recognition: Protects Ender Dragons, Withers, Wardens, Elder Guardians, Ravagers, Iron Golems, Piglin Brutes, Evokers, Breezes, and modded champions/titans.
- Configurable Health Thresholds:
- Major Boss Threshold:
bossHealthThreshold (Default: 150.0 HP / 75 hearts).
- Mini-Boss Threshold:
miniBossHealthThreshold (Default: 50.0 HP / 25 hearts).
- Absolute Sightline Protection: Bosses and mini-bosses are never culled behind solid blocks, never culled by crowd caps, and never downscaled by detail LOD.
📦 Block Entity Occlusion Culling
Skips render extraction for block entities that are completely encased or occluded:
- Enclosure Check: Automatically unrenders chests, signs, banners, skulls, and decorated pots that are fully surrounded on all 6 faces by solid opaque blocks.
- Line-of-Sight Check: Skips rendering when blocked from camera view on aggressive culling profiles.
⚙️ 4 Culling Intensity Profiles
- LOW (Conservative): 5.0m buffer, 7-point sampling, padded hitboxes.
- MEDIUM (Balanced): 3.5m buffer, 5-point sampling, culls all block entities.
- HIGH (Aggressive): 3.0m buffer, 3-point sampling, aggressive block entity culling, decorative entity culling.
- SUPER (Extreme - Default): 2.0m buffer, ultra-fast 2-point check for maximum FPS on modern systems.
📋 Quick Command Reference
All settings can be inspected and adjusted in-game via the /cameraculling command suite:
/cameraculling status → View live statistics, active level, and thresholds
/cameraculling toggle → Toggle culling on or off
/cameraculling set <low|medium|high|super> → Change culling intensity preset
/cameraculling particles [true|false] → Toggle particle occlusion culling
/cameraculling animations [true|false] → Toggle block & texture atlas animation culling
/cameraculling crowdculling <true|false> → Toggle crowd overdraw / entity-behind-entity culling
/cameraculling cluster <1-128> → Set cluster density cap for packed mob pens (default: 8)
/cameraculling entitylod [true|false] → Toggle entity detail & secondary layer LOD
/cameraculling entitylod distance <4.0-256.0> → Set entity detail LOD distance threshold (default: 32.0m)
/cameraculling texturlod <true|false> → Alias for entity detail LOD toggle
/cameraculling bossimmunity <true|false> → Toggle boss & mini-boss immunity
/cameraculling bosshealth <boss_hp> [miniboss_hp] → Set major boss health threshold (default: 150.0 HP)
/cameraculling minibosshealth <miniboss_hp> → Set mini-boss health threshold (default: 50.0 HP)
/cameraculling blacklist add <entity_id> → Add mob to personal client immunity list (e.g. minecraft:wolf)
/cameraculling blacklist remove <entity_id> → Remove mob from personal immunity list
/cameraculling blacklist list → List all personal blacklisted entities
/cameraculling blacklist clear → Clear personal immunity blacklist
/cameraculling serverblacklist add <entity_id> → Add mob to server admin immunity list
/cameraculling serverblacklist remove <entity_id> → Remove mob from server admin immunity list
/cameraculling serverblacklist list → List all server blacklisted entities
/cameraculling serverblacklist clear → Clear server admin blacklist
/cameraculling debug [true|false] → Toggle real-time diagnostic tracing in chat & logs
/cameraculling reload → Reload configuration from disk
⚙️ Configuration File
Settings are saved directly to config/camera-culling.json:
{
"enabled": true,
"level": "SUPER",
"cullEntitiesBehindEntities": false,
"maxEntitiesPerCluster": 8,
"entityDetailLod": true,
"entityLodDistance": 32.0,
"bossImmunity": true,
"bossHealthThreshold": 150.0,
"miniBossHealthThreshold": 50.0,
"cullParticles": true,
"cullAnimations": true,
"cullSignText": true,
"clientBlacklist": [],
"debugMode": false
}
📦 Installation & Environment
⚛️ Environment Support
- Client-side only: All functionality is done client-side and is compatible with vanilla servers.
- Works in singleplayer too
- Compatible with any multiplayer server
- Server-side only: Server-only installation.
- Client and server: Requires installation on both sides.
📥 Install Instructions
- Install Fabric API.
- (Optional) Install ModMenu and YetAnotherConfigLib for in-game graphical settings.
- Download the latest Camera Culling JAR for your Minecraft version and place it in your
.minecraft/mods folder.
- Launch Minecraft and enjoy smooth, optimized frame rates!
☕ Support
If you enjoy Camera Culling and the Vanilla Outsider philosophy, consider fueling the next update!
📜 Credits
| Role |
Author |
| Creator |
Dasik (Rifaditya) |
| Collection |
Vanilla Outsider |
| License |
GNU GPLv3 |
[!IMPORTANT]
📦 Modpack Permissions & Distribution:
You are fully welcome to include this mod in any modpack on any platform! However, the mod file must be downloaded directly through official distribution channels (Modrinth or CurseForge). Re-uploading, mirroring, or redistributing the original mod JAR to third-party mirror sites, scraper portals, or unauthorized launchers is strictly prohibited.
⚖️ License & Fork Guidelines (No Zero-Change Re-uploads):
This project is open-source under the GNU GPLv3. You are fully encouraged to inspect the code, learn from it, and fork the repository to create genuine modifications, substantial feature expansions, or community ports—provided your project remains open-source under GPLv3 with proper attribution.
However, straight 1:1 re-uploads, clone forks with no meaningful functional changes, or re-publishing identical builds under different project names (e.g. to farm downloads or rewards) are strictly forbidden.
Made with ❤️ for the Minecraft community
Part of the Vanilla Outsider Collection
评论 0
登录后参与评分
还没有评论,来抢沙发吧