- Java 79.2%
- Python 20.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src/main | ||
| tests | ||
| .gitignore | ||
| build.py | ||
| LICENSE | ||
| README.md | ||
| run_checks.py | ||
| VALIDATION.json | ||
EFRO — Epic Fight Render Optimizer
A separate client addon for Minecraft 1.20.1, Forge 47.4.x and Epic Fight 20.15.2. Keep the original Epic Fight JAR installed. The addon patches its renderer through Mixin; rebuilding Epic Fight is unnecessary.
The built addon is build/epicfight-render-optimizer-1.0.0.jar. Its dependency metadata requires Epic Fight 20.15.2 exactly, because these patches depend on that version's internals. Review and retest before using another Epic Fight release.
Included changes
| Change | Behavior |
|---|---|
| CPU skinning | Reuses per-mesh matrix storage and temporary vectors. Calculates the inverse-bind matrices once per draw and preserves individual model-part transforms, hidden parts, vertex overrides, lighting and colors. |
| Partial GPU uploads | Limits uploads to the requested range, handles nonzero offsets and restores staging-buffer capacity for subsequent writes. A 32-matrix upload becomes 2,048 bytes rather than the 64,000-byte capacity of Epic Fight's pose buffer. |
| Compute uniforms | Caches uniform wrappers and locations per compute program; clears them when the program is relinked or deleted. |
| GPU buffer cleanup | Closes the output vertex SSBO that Epic Fight omits when destroying a compute mesh. |
| Trail geometry | Uses an array-backed edge list and reuses four temporary rendering vectors. Covers both gameplay and editor constructors. |
| Trail culling | Builds bounds around every live trail endpoint, including geometry left behind by a moving entity, so offscreen trails can use Forge's particle frustum culling. Empty or invalid bounds retain the original uncullable behavior. |
The addon preserves Epic Fight's compute-mode selection. This instance currently has use_compute_shader = false; CPU skinning and trail optimizations still apply. The GPU upload and uniform changes apply when Epic Fight uses its compute renderer. Poses and finished geometry are recalculated each draw.
This implementation covers the six targeted fixes. Sharing deformation across render passes, replacing armor pipelines, shaderpack-specific rendering and a new batching/VAO architecture would require further renderer work.
Configuration and removal
After the first launch, Forge creates minecraft/config/epicfight_render_optimizer-client.toml. All switches default to true:
[rendering]
optimize_cpu_skinning = true
fix_partial_gpu_uploads = true
cache_compute_uniforms = true
close_compute_output_buffers = true
optimize_trail_geometry = true
cull_trails = true
Each switch allows its corresponding change to be disabled. Restart after editing the configuration; the trail list type is chosen when each particle is constructed. Remove epicfight-render-optimizer-1.0.0.jar from minecraft/mods and restart to uninstall. Existing Epic Fight, packfixes and rendering-mod JARs remain installed.
Validation
VALIDATION.json records the tested artifact and dependency hashes and the disposable client results. Each of these configurations passed 132 checks:
- Epic Fight and the addon.
- Epic Fight, the addon, Embeddium 0.3.31, Oculus 1.8.0 and this pack's existing packfixes repair.
- The full enabled mod set from this instance, with the addon.
The tests run inside transformed Forge classes with a real OpenGL context. They compare original and patched CPU vertex output over 24 randomized poses, including inverse binding, animated/hidden parts and unchanged input matrices. They check exact trail rendering output at five partial ticks, bounds and frustum visibility, partial/full GPU writes, uniform relinking, byte-identical compute output and buffer deletion.
These are automated rendering checks at the title screen. They do not open player saves, perform a gameplay soak test, exercise an enabled shaderpack or measure FPS. The test context used the RX 560's native Mesa radeonsi OpenGL 4.6 driver; the instance's earlier production log used Zink. Shaderpack behavior and the production driver path therefore need separate validation before claiming coverage or a performance gain.
Building and rerunning checks
The build uses Java 17 and Python 3 with the Prism instance's cached Forge, Minecraft, and library JARs and its installed Epic Fight JAR. It uses the installed production SRG names directly, so there is no Gradle remapping or download step.
From this directory:
python3 build.py
python3 run_checks.py minimal
python3 run_checks.py oculus
python3 run_checks.py full
On this NixOS installation the available Python executable is /nix/store/0r6k8xa2kgqyp3r4v2w7yrb80ma2iawm-python3-3.13.12/bin/python3. build.py defaults to the installed Nix Java 17 path; set EPIC_RENDER_JDK to another JDK 17 root if required.
The builder produces a deterministic JAR and build/build-info.json; it does not install the JAR. The checks require a graphical session and create their own directories under build/. Production mod JARs are read through symlinks; each test uses a copied addon and its own configuration. Keep the test fixture JARs out of the production mods directory.
Source and license
The renderer behavior and CPU skinning algorithm were reviewed against Epic Fight's 1.20.1 source, commit 5c7f6e796a9ee239ffc59b812e15368a1038c34c, and verified against the installed Epic Fight 20.15.2 bytecode. Epic Fight is developed by Antikythera Studios and its contributors. This is an independent local addon.
The addon is distributed under GPL-3.0-only, following the upstream code it adapts. See LICENSE. Complete addon sources are in src/main/java, resources in src/main/resources, and the rendering fixture in tests/RenderSmoke.java.