-
Notifications
You must be signed in to change notification settings - Fork 5
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
Low performance/More in-depth documentation #18
Comments
Docs are high pri as soon as 1.0.1 is out (very soon) You can used instanced rendering to draw those cubes with one draw call, but I guess that is hard to start with when docs are not relevant any more. There's A LOT of new features that comes with using ModernGL that are easily available. This is actually a perfect example we could use to illustrate the use of these features. |
I did some profiling. It's actually the matrix operation in python that are dreadfully slow! Drawing 100 cubes the naive way like this is probably not the way to go, but this was still very useful to look at. I will provide an improved example shortly. |
Faster naive version: https://github.com/Contraz/demosys-py-test/tree/master/testdemo/bouncingcubes This one eliminates the matrix operations in the loop. I'll see if I can make an instanced example as well. |
Modified a bit more. It seems I can draw around 1000 cubes the naive way and still get 60 fps when removing matrix operations in the loop. I think this is mostly related to Still it's nice to see that it's possible to at least get at least 1000 draw calls at 60fps |
I added support for instanced rendering (in master now). Here is your bouncing cube example drawing 250.000 cubes instances with modified positions each frame through transform feedbacks. So we have moved from 100 cubes at 15ps to 250k cubes at 60 fps (at least on my laptop) 😄 |
Closing this as #8 covers the docs. |
I cloned newest demosys-py and started modify basic cube template. Code is available:
https://github.com/helgrima/saturday77/blob/master/bouncingcubes/effect.py
I am quite sure that code is just silly, and that is why I got so low performance, like 15 fps.
Display adapter: NVIDIA GeForce GTX 950
Very same happened with version 0.4.0 also.
I understand that documentation is going to be changed, as it seems that all effect templates had changes since yesterday. So could this be included in that documentation update as well?
The text was updated successfully, but these errors were encountered: