
Poor ambient occlusion performance
makamys opened this issue ยท 5 comments
If smooth lighting is enabled, the mod reduces the framerate while chunks are being updated. This happens even with all options in the config disabled. When smooth lighting is turned off however, the mod doesn't affect framerate.
Comparing profiler snapshots, I have found renderStandardBlockWithAmbientOcclusion
to be the culprit: its CPU time increases from 10% to 25% with Triangulator. So the issue seems to be caused by @embeddedt's smooth lighting fix.
Frametime graphs (chunk updates begin in the middle)
Without Triangulator (~130 fps):
With Triangulator (~100 fps):
Snapshots (.nps)
Mods
falsepatternlib-mc1.7.10-0.9.4.jar
mixingasm-1.7.10-0.2.1.jar
sampler-1.60.1.jar
SpongeMixins-1.4.0.jar
triangulator-mc1.7.10-1.7.3.jar
World
Seed: -2819719315308026247
XYZ: (-29, 64, 81)
This might be due to the Inject allocating a CallbackInfo object every time. Maybe the Redirect version pushed recently to master would fix that?
i am currently working on a full rewrite of the solid block rendering system inside the https://github.com/FalsePattern/Triangulator/tree/rewrite branch, replacing vanilla code, using a full overwrite, with improved and more modular render code
Should be fixed in 2.0 alpha 1, i made the mixin for the target an @Overwite
instead, which has zero overhead (with a fallback config option for enabling @Inject
mode in case another mod also mixes into those 2 methods.)
Nice! I repeated the experiment with 2.0, and the issue appears to be gone.
Without Triangulator (~133 fps)
With Triangulator 2.0 (~134 fps)
With Triangulator 1.7.3 (~111 fps)
Mods
00gasstation-mc1.7.10-0.3.2.jar
falsepatternlib-mc1.7.10-0.10.10.jar
sampler-1.60.1.jar
[nothing] OR triangulator-mc1.7.10-2.0.0-alpha0001.jar OR triangulator-mc1.7.10-1.7.3.jar