-
Notifications
You must be signed in to change notification settings - Fork 435
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
Optimized Render code for TextBuffers #2865
base: master-MC1.7.10
Are you sure you want to change the base?
Optimized Render code for TextBuffers #2865
Conversation
So if I understand correctly, this replaces display lists with textures? In which case, cool, this is something I would have liked to try out (back when I was more active on OC dev :P) but never got around to, in part because I wasn't certain it'd actually be feasible, GPU memory-wise. And that's one of the two points where you could make me a lot more at ease with merging this: would you mind running a comparison of the new rendering code and the old one with a superflat (less noise) scene that has a whole bunch (*) of individual (actively rendering) T3 screens in it, and see how GPU memory usage reads? GPU-Z should probably work, otherwise there's an OpenGL callback to get memory usage IIRC. I have no idea how memory-(in)efficient display lists are, so this might even be better with textures, but still, I'd like to see actual numbers. Second, I'd very much like for the old method to be available via an option, still. Just so we can tell people in case they should run into any kind of issue to use that until it can get fixed. Once it's proven itself, we can kill the old codepath (say in half a year/with MC 1.13 or so). I'll be gone for most of the week, but I expect to be able to look at the code more in-depth next weekend. However this turns out, thanks in advance for taking a shot at this! (*) Very specific, I know. I'd go with 32 or so, just to be able to see a significant difference and avoid noise messing up results. |
Oh wow I can upload the Test world... Sure! |
First thing I noticed, this does not fix issue #779. That's more of a different thing focused on the Lua side, this PR is more about rendering efficiency (and for rendering it's good! 👍) Secondly, the stretching would be fine if it only stretches by integer multiples, which it doesn't when the size it is stretched to wouldn't otherwise fit, leading to it looking wrong when a high resolution is set. |
A big change I'd like to introduce with this is making linear scaling the min filter for screens - which was impossible in the old system, but would definitely help performance. I have my own concerns over VRAM usage at scale, though. |
if we've added this to the our 1.7.3 milestone, we need to have the PR author finish the concerns of the review. @cam72cam before we can merge this, we would need all of the following addressed
|
|
For what it's worth, for NVIDIA GPUs on Linux (with the official drivers), a very useful tool is running |
@cam72cam I can confirm there is a drop in FPS to half on integrated graphics. This will affect a good number of users, unfortunately We are very close to releasing our 1.7.3 patch. I choice on this PR is three-fold
|
Sorry I have not been able to work on this PR much. Work has kept me busy and all my current free time goes into IR. |
@cam72cam Any updates on this? |
This PR replaces the existing infrastructure for TextBuffer Rendering with a texture sheet.
Benefits:
TODO:
Stress Test Program (Courtesy of Ristelle):
Test Results:
AMD R9 380: 5FPS - 60FPS (linux vsync locked)
NVIDIA GTX 650: 80FPS - 80FPS
INTEL Celeron 847 HD Graphics (1.1GHz): 10FPS vs 30FPS
more coming soon