Multiple changes for dynamic VRAM allocation, and compat with FalseTweaks threaded rendering and OptiFine shaders #57
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains multiple features that we have added to neodymium on our internal development branch over the past several months. Most of these are deeply coupled with eachother, and as such, we weren't able to split it up into separate PRs without causing breakages between them.
Major changes
Dynamic VRAM allocation
The renderer is no longer restricted to a single VBO, but instead uses multiple sub-VBOs. This way it can support render distances beyond 16 (optifine, falsetweaks, etc.) without issues.
Additionally, the VBOs have been split up to be separate for render pass 0 and 1, this simplifies the per-VBO logic and index buffer shuffling
FalseTweaks threading compat
This feature was developed in parallel with FalseTweaks 3.0, and as such will require updating Neodymium before the FT update is released as stable. This mainly added thread safety to various logic that works with the tessellator, as well as exposing some previously internal methods as public API for FalseTweaks to hook the threading logic onto.
Improved OptiFine compatibility
The optifine fixes mainly focus on properly handling the shadow pass when shaders are enabled. Additionally, a "stub" jar for optifine was pulled in as a maven dependency, which only contains the shadersmod part (which in itself is open source and thus not limited by the optifine redistribution license). This removed multiple reflection calls that caused microstutter.
Minor changes
More aggressive GC
The vram garbage collector is now slightly more aggressive. The dynamic vram allocator also contains more efficient vram management logic, so this could be implemented with zero extra performance hit.
Much faster vram visualizer
Exactly what it says on the tin, the vram visualizer is now only a single tessellator draw call, instead of one per pixel.
Fixed git version retrieving
git describe
can do the same thing thatget_version.py
was doing, without making the repo depend on python.Toggleable update checker
Config option for disabling the update checker. Good for modpacks.
Driver jankiness workarounds
The GC doesn't kick in for 25 frames after doing F3+A. For some reason, on Windows + NVIDIA, the GC caused the game to violently stutter right after a renderer reload.
Updated the repo to use the latest LWJGL2 build in dev
This is the default lwjgl2 version used by virtually all launchers nowadays.