Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple changes for dynamic VRAM allocation, and compat with FalseTweaks threaded rendering and OptiFine shaders #57

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

FalsePattern
Copy link
Contributor

@FalsePattern FalsePattern commented Apr 28, 2024

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 that get_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant