-
-
Notifications
You must be signed in to change notification settings - Fork 850
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
Render some wide lines as sets of triangles #3187
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
Tested in macOS/arm64 and yes, this patch improves performance and solves #2836 |
3f2beab
to
3667742
Compare
Just developing my own stuff around finding out why the transitions are so damn slow. (#3183). Will do in 1-2 hrs. |
35951af
to
bc54f80
Compare
Aren't asteroids created at random times? This might introduce some uncertainties. |
No, maybe you mean meteors/shooting stars? I mean the minor planets.
But not by much. Both show a few tenths of fps up and down, but maybe its something like 37.2 vs 36.8. ±0.5. I have plenty of cores free, overall CPU load at 15%. (And yes, we should identify ways to distribute load better!) The major effect of #2836 was on Apple. If this solves it, it's OK for me. |
b667901
to
278d653
Compare
Seems to be the same as before. |
@alex-w Is this lines disabled vs lines enabled? What about the case with lines enabled before this commit? |
Should be I think.
Is it much worse than before this commit? Do you run a Release build?
You can enable all of them for greater effect. The borders had a large impact in #2836. |
Yes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Your screenshots have strangely inconsistent frame rates, maybe because of the time taken to switch to screenshot mode. Could you type the values that you see on the screen in real time instead of the screenshots? |
23.1: 37fps
Yes, I have read and seen that. However strange that sounds if there apparently were no issues around gridlines on Macs. |
Strange behavior (and not really acceptable). Is the CPU used 100%? What about the GPU? |
master, FOV 180 degrees, OpenGL compatibility mode - same FPS (17.9) for both cases - without and with borders. master, FOV 180 degrees, OpenGL core profile mode - 17.9 and 2.4 FPS for without and with borders respectively. current branch, FOV 180 degrees, OpenGL core profile mode - same FPS (17.9) for both cases - without and with borders. P.S. v23.1, FOV 180 degrees, OpenGL core profile mode - 17.9 and 10.9 FPS for without and with grids (equatorial + horizontal) respectively. P.P.S. this branch, FOV 180 degrees, OpenGL core profile mode - same FPS (17.9) for both cases - without and with grids (equatorial + horizontal). P.P.P.S. Max FPS for master and this branch is over 30. |
@gzotti When you have time, please test the following scenario with the new debug commit:
I think this will be the fairest comparison of the two modes. |
I had to switch several grids to go below 60fps. Both ways fluctuate 36-40 fps, with 9-10% CPU and 24% GPU load. I may have to reboot to activate >60fps which I will not do right now, I seriously must do sth else now. |
With VSync disabled and only horizontal grid Still almost inconclusive. Probably a draw on the latest and greatest system. I can test on Intel only later next week. |
Intel UHD Graphics 630; Windows 10 A black screen, FOV 235 - average FPS 59; azimuthal grid - avr. FPS 46; equatorial grid - avr. FPS 47; azimuthal + equatorial grids - avr. FPS 32 |
This is full crap - this branch with Qt 6.5 on M1 (OpenGL core profile mode) is slow as it was before now :( |
Have you checked in the log that tessellation is enabled? Or simply checkout the previous commit, 278d653. |
No tessellation in the log 🤪 |
No tessellation — no optimization. You're in the wrong mode :P . Press Z to enable azimuthal grid and tessellation. Each enable toggles. Or, once again, just go to the commit before the debug one. |
Aargh... A debug message for tesselation mode for azimuthal grid only. OK, azimuthal grid + boundaries = good rendering. Sorry for false panic 😳 |
I measured a tiny difference on GeForce GTX 750Ti, which is not really latest nor greatest. On my Intel UHD Graphics 620 the difference is also imperceptible. So if you don't mind, I can simply merge this PR. |
Maybe I should still test on Intel i5-4xxx and RPi3/4. Sorry, next weekend. |
f2c6830
to
3f35207
Compare
Intel Core i5-4570 (HD4600), Qt6.5: disabled: 15.2±0.3 -- enabled: 15.0±0.3. Again, hard to see the difference. (The fps difference between OpenGL and ANGLE may come from a different FoV.) RPi3 (smaller screen, not comparable): disabled: 9.37±0.1 -- enabled: 9.43±0.2. A tiny improvement! |
What does this mean? Nothing rendered when thickness is >1? |
Yes, lines stay thin. This was always the case on ANGLE (~GLES2.0). I just hoped this may enable wide lines. |
It doesn't do nothing, it sets Does your testing show that this PR is OK other than this ANGLE problem? |
Yes, I think other than that this would be OK. If this enables wide lines in ANGLE, it is also visible progress here! |
OK, it should work in GLES2 now. Caveat as before: wide lines with color varying per vertex are still rendered with geometry shader on Core profile, and as thin lines in GLES2. This use case is not so frequent though, so I think it should be OK. |
@alex-w Please check that the last commit hasn't broken anything on macOS. The logic is a bit convoluted now. |
Confirm this works! I think we currently (never had) lines with separate vertex colors. Ah, not sure about the technical details of meteors. They should not be affected, though. OK, from my side it's fine now, thank you! |
30FPS with boundaries and 37FPS without boundaries - so, this is acceptable |
Additionally, support for wide lines is enabled on OpenGL ES 2. This currently only affects lines with primitives being GL_FLOAT-based vectors and scalars. Also, the case when indices or color buffer are used is not affected by this commit. The cases not affected by this commit continue being handled via geometry shader. As most of the lines currently rendered are fixed-color without index buffer, this shouldn't have a noticeable performance impact.
b51b348
to
33834d9
Compare
Hello @10110111! Please check the fresh version (development snapshot) of Stellarium: |
Hello @10110111! Please check the latest stable version of Stellarium: |
This is an experimental partial conversion of some wide-line
LineStrip
primitives to rendering via manual tesselation. May fix #2836.Please check whether