-
Notifications
You must be signed in to change notification settings - Fork 29
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
Blur causes massive FPS drop #21
Comments
I currently lack the required knowledge about OpenGL and Shaders to do that. |
@Motschen any news on improving performance? |
On lower end machines this is detrimental to FPS |
I was a bit curious too, so I found time to work on this issue, and I leave this as I created a commit. I knew the following part of shader file was the bottleneck because FPS drops significantly when radius is increased:
So to solve this, the next step is to reduce the number of iterations of this loop. But I’m not good at GLSL shaders, I apologize if I’m misguided. I’ll decide to adopt Gaussian Filter. As mentioned by stashymane, the implementation of StreamFX was very helpful. However, we’re modding on Minecraft, so there are LWJGL’s limitations. Gaussian filter with 31 kernel sizes: The current implementation is good, so I think optimizing and resolving this issue may lead to a reduction in appearance. It’s a trade-off, so perhaps it’s inevitable. I’d be happy if anyone else can come up with a better implementation. |
That looks fantastic. If you have a built jar for 1.20.x could you please send it to [email protected] |
Uploaded to my repo, please check. |
On 1.20.2 this mod still causes a massive FPS drop, even when not in menus. |
I have done a proof-of-concept implementation of Dual Kawase Blur(at vgskye/Blur), which seems to give good results and should be faster, but it has completely different config options from Gaussian and fade-in/-out is somewhat worse because dual kawase can't smoothly fade from zero blur to blur(well, as far as I know). the code is also kinda a mess with multiple low-hanging fruits for optimization and bad variable names in shaders, but it might be helpful |
Has anyone done testing on how performant the blur fx mojang added in the new snapshots is? Perhaps we could just backport that if we can't get fading for Dual Kawase Blur |
When my blur radius is set to merely 10, my GPU usage doubles every time I open a GUI that's blurred.
A great addition would be a more efficient blur algorithm (or even several), something like StreamFX for OBS has. The examples linked have relatively detailed info on how they work, and I barely see any performance decrease while using these filters.
The text was updated successfully, but these errors were encountered: