-
Notifications
You must be signed in to change notification settings - Fork 27
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
Split up performance mode options #206
Comments
This is certainly possible. I wonder what the performance gains would be from only switching from points to square shapes. Have you tested this by chance? |
I just tested this with Chrome's profiler, and it seems to more than halve my render times (~16.8ms => ~7.8ms). I can also barely tell that the shape changed at the size I'm looking at it. I have a hunch that the performance gains may have to do with not having to compete the square root to find the distance from the point center in the fragment shader, but that's speculation of course. |
Ah cool! Thanks for running the performance test. I'm not surprised it's faster as the fragment shader is a simpler and I suspect that every saved computation at some point matters performance wise. If you have the chance, I'd be curious how much more performance the alpha blending saves. Anyway, it shouldn't be hard to allow just using squares instead of rectangles. But I can't say exactly when I have time to add that feature given the holidays etc. |
I'll check the alpha blending difference tonight. No worries in terms of the timing. Happy holidays! |
I checked the difference between blending enabled and disabled while using the simplified shader and it seems to be about an 8% decrease in frame time when disabling blending. Granted, my measurements aren't all that because I'm getting ~6.4ms average now with blending and ~5.9ms without blending, so any (including previous) numbers should obviously be taken with a healthy dose of salt. |
PR for this is ready, if you have a chance, please give it a try. The changes are pretty straight forward. See #210 |
Right now there is a single "performanceMode" option. This both makes the points render as squares (easier on the fragment shader), and disables blending. Our application depends on having alpha blending, but point shapes aren't nearly as important. Some of our users only have a low-tier integrated GPU and we have ~11m points, so we could greatly benefit from just having the blending instead of both blend mode and shader change. Would it be possible to separate those two?
With kind regards & thanks in advance!
The text was updated successfully, but these errors were encountered: