ZeroK-RTS / Zero-K

Open source RTS game running on the Spring/Recoil engine
https://zero-k.info
GNU General Public License v2.0
676 stars 204 forks source link

GL4 Outline perf issue on zoom-in #4852

Open sprunk opened 1 year ago

sprunk commented 1 year ago

https://discord.com/channels/278805140708786177/278908415756206080/1087162130022797322

\<MSPR> also the " outline shader GL4" widget, as seen in 'gfx_outline_shader_gl4.lua' has severe performance issues , very noticable during zoom-ins. It should not be a default widget in its current state.

GoogleFrog commented 1 year ago

All I recall is that it does extra loops inside shader code when zoomed in. This is to make line thicker. What is "severe", pictures?

M5PR commented 1 year ago

That ups the amount of calculations.

Can you not reproduce this. Curious.

I'll follow up with some more information like screenshots of "severe" FPS drops if you like that.

M5PR commented 1 year ago

No outline: 116fps. Around 15% of the slider and regularly zoomed in for microing a combat I have drops to 60. 80% thickness and zoomed in a bit more 38 fps. Full thickness, zoomed in fully, 16 fps.

I can provide screenshots, but they are just what I said. Again, I suggest removing this widget or at least testing it out yourself. Not for me, I know how to turn it off. For other people suffering from unknown frame-drops.

The widget seems a composite of multiple ideas put together. Though admittedly, I know absolutely nothing about shaders.

moreginger commented 9 months ago

I can only make this hit framerate hard with 5x line thickness. Then I can get a drop from 90 to 26 fps when heavily zoomed in.

With 1x line thickness I'm seeing a hit of under 10% in any normal situation which, admittedly, is quite a lot for one effect - but it's not so bad that I'll turn the effect off. It seems likely that the issue is somewhat hardware dependent. What GPU are you running @M5PR ?

screen00007

moreginger commented 6 months ago

https://bgolus.medium.com/the-quest-for-very-wide-outlines-ba82ed442cd9

Anyone want to implement jump flood?