are features expensive now?
Moderator: Moderators
Re: are features expensive now?
what should that tell us?
Re: are features expensive now?
Thanks behe. Zooming in renders less features, so feature fading is likely not related to this. Anyway I mantised it.
http://springrts.com/mantis/view.php?id=3061
http://springrts.com/mantis/view.php?id=3061
Re: are features expensive now?
FSAA is the same as SSAA?
Re: are features expensive now?
yes (FSAA and SSAA are synonyms), and no (Spring uses MSAA)
1) on this screenshot (and this better one), there are 126 features visible?
2) of those 126 features, 63 have 3840 vertices and the remaining 63 have 1472?
3) each of these is being rendered at least twice per frame, both times with textures bound (for the alpha-masked shadows) so your 4xAA is effectively 8xAA?
4) even with MSAA, depth values are still super-sampled (like regular fragments in FSAA/SSAA)?
Did you know that:Beherith wrote:Look at Altored divide remake:
26 fps:
1) on this screenshot (and this better one), there are 126 features visible?
2) of those 126 features, 63 have 3840 vertices and the remaining 63 have 1472?
3) each of these is being rendered at least twice per frame, both times with textures bound (for the alpha-masked shadows) so your 4xAA is effectively 8xAA?
4) even with MSAA, depth values are still super-sampled (like regular fragments in FSAA/SSAA)?
Last edited by Kloot on 13 Apr 2012, 16:25, edited 1 time in total.
Re: are features expensive now?
Kloot, any ides on WHY it is so slow now? I though that 3x cost jk was talking about was fixed?
Re: are features expensive now?
I get the same framerate in 82.7 (~90 to within a variance of ~10, double the amount after /advmodelshading 0) for that viewpoint using the same springrc settings despite all the code changes between 82.7 and 88.0, so I don't understand where this "feature drawing is slow now" sentiment is coming from. As for why that specific situation on Altored is slow, my previous post contains two big hints.
No, when and where did you get that idea? He only mentioned it two days ago and the "3x" part refers to some code which only becomes active when zoomed out, so that is not relevant anyway.I though that 3x cost jk was talking about was fixed?
Re: are features expensive now?
Kloot explained why it is slow and I gave the reason why it is such damn slow. And no it isn't fixed, also zerver's last post gives me the impression my way of solving it would cause again much hate, neither do I see zerver fixing his code ...
current code calls glAlphaFunc() for each invisible+fading feature returned by getquad() (means it matters when zoomed in, too!), it is a no-go function for per-instance drawing. glAlphaFunc() causes a lot restructure in the GPU and takes a damn lot of time. Neither are the current glMaterialfv() calls ideal, they change _uniform_ vars. On Nvidia GPUs uniforms are a lot slower (on change) than attributes (glColor, texcoords, ...) and should be avoided on per instance drawing, too.Kloot wrote:the "3x" part refers to some code which only becomes active when zoomed out, so that is not relevant anyway.
You would need to compare it with pre-fading-features which where added iirc with 78-79, but there the features won't show I assume (maps are incompatible with such engine builds).Kloot wrote:I get the same framerate in 82.7
Re: are features expensive now?
kloot:
"Zoomed out", behe's shots are "zoomed in" to me. It is new because ever since I saw the fps drop, I assumed it was my code. This has been the case for well over a year. I usually tested on the map gunmetal harbor. which heavily uses features. but because I didn't think features were the cause, I just assumed I fixed the bug when I moved to testing gundam on gantelope. I had NO idea that it was because gante has no features. then I came back to gunmetal, saw the fps plummet and started looking outside of gundam. I don't know when or what changed. when I played gundam back in 2010 I was playing with several people in map wide survival matches. Now just running gunmetal with NOTHING going on is at 45fps? that is a bit strange.
"Zoomed out", behe's shots are "zoomed in" to me. It is new because ever since I saw the fps drop, I assumed it was my code. This has been the case for well over a year. I usually tested on the map gunmetal harbor. which heavily uses features. but because I didn't think features were the cause, I just assumed I fixed the bug when I moved to testing gundam on gantelope. I had NO idea that it was because gante has no features. then I came back to gunmetal, saw the fps plummet and started looking outside of gundam. I don't know when or what changed. when I played gundam back in 2010 I was playing with several people in map wide survival matches. Now just running gunmetal with NOTHING going on is at 45fps? that is a bit strange.
Re: are features expensive now?
glAlphaFunc might not be a big problem when zoomed in because the test-value passed to it is 0.5 and the shadow pass uses the same value --> a smart driver will probably avoid the state change if nothing else calls it.
smoth: what framerates did you usually get on Gunmetal? Would you be willing to verify that with this old (0.77b5) installer?
That's true, fading features were committed for http://springrts.com/mantis/view.php?id=1335 / 0.78.2.1 (with https://github.com/spring/spring/commit ... c4b76ce368) but note that the code then neither performed alpha-testing nor material updates and smoth's use of "now" suggested a more recent problem. I also placed a 'return' at the top of FeatureDrawer::DrawFadeFeatures and still had the same performance as without it (when zoomed in).jK wrote:You would need to compare it with pre-fading-features which where added iirc with 78-79, but there the features won't show I assume (maps are incompatible with such engine builds).
smoth: what framerates did you usually get on Gunmetal? Would you be willing to verify that with this old (0.77b5) installer?
Re: are features expensive now?
Not that AlphaFunc I mean the one in CFeatureDrawer::DrawFadeFeaturesSet with glAlphaFunc(GL_GREATER, fi->second / 2.0f);Kloot wrote:glAlphaFunc might not be a big problem when zoomed in because the test-value passed to it is 0.5 and the shadow pass uses the same value --> a smart driver will probably avoid the state change if nothing else calls it.
Re: are features expensive now?
IIRC they were pretty solid, I ran in vsync most of the time back then so mostly it was 59-60fps. In a really large battle, with lots of stuff happening(this was 3-4 players vs 1 spawner) I had bottom 10-35fps.Kloot wrote:smoth: what framerates did you usually get on Gunmetal?
Sure I can try when I get home tonight.Kloot wrote:Would you be willing to verify that with this old (0.77b5) installer?
*Edit*
I should also note 2010 I had a dual 3.4 ghz and 8 gigs of ram. Not sure if it relevant
Re: are features expensive now?
Tested it today again, too. Now it doesn't give an significant improvement either :/Kloot wrote:That's true, fading features were committed for http://springrts.com/mantis/view.php?id=1335 / 0.78.2.1 (with https://github.com/spring/spring/commit ... c4b76ce368) but note that the code then neither performed alpha-testing nor material updates and smoth's use of "now" suggested a more recent problem. I also placed a 'return' at the top of FeatureDrawer::DrawFadeFeatures and still had the same performance as without it (when zoomed in).
Just a few weeks ago Seth2 gave me <40fps with it (and >140fps w/o it), possibly it was related to some system/driver change.
Re: are features expensive now?
settings could not be setup.
Couldn't run the same gundam in old spring.
not able to use that version, sorry kloot.
Couldn't run the same gundam in old spring.
not able to use that version, sorry kloot.
Re: are features expensive now?
I did not verify Kloots' numbers, but if they are correct, I would say that this map simply has very advanced features.Kloot wrote:2) of those 126 features, 63 have 3840 vertices and the remaining 63 have 1472?
An armflash has about 50 vertices so just a single of these trees can equal something like 100 armflash. 10 trees = 1000 armflash etc. Try to spawn 1000 armflash and look at the FPS.
Also, with the alpha masked textures of these features, almost all of the vertices have to be rendered since virtually none are occluded. Even more so when you zoom in.
Terrain only: 220 fps
20 of the worst trees zoomed in: 40 fps
Same trees without alpha masks: 110 fps
Same trees without alpha masks and without depth test: 40 fps
It is apparent that the lowest two figures come from the fact that the system has to render all vertices due to transparency and in my last test due to the disabled depth test.
For comparison
500 armflash, without depth test: 110 fps
1000 armflash, without depth test: 70 fps
Fading features also has a performance hit, but not as big as the one caused by zoom in. The fps drops to about half on my system. The fading will also force the system to render all vertices due to transparency.
Re: are features expensive now?
I was able to play with higher fps years ago on an LESSER machine. Now it is really low. Do you really think the fade is hurting it that much? is there a way to turn it off to test?
Re: are features expensive now?
On the same map?smoth wrote:I was able to play with higher fps years ago on an LESSER machine. Now it is really low. Do you really think the fade is hurting it that much? is there a way to turn it off to test?
Re: are features expensive now?
i remember when spring was all free - and the moddevs didnt have to pay extra for every feature.
Re: are features expensive now?
Forget about this specific map and other maps that use the same trees. Are there any other maps with problems?FLOZi wrote:On the same map?smoth wrote:I was able to play with higher fps years ago on an LESSER machine. Now it is really low. Do you really think the fade is hurting it that much? is there a way to turn it off to test?
Fading has zero impact when zoomed in, but I will try to make it configurable anyway.
Re: are features expensive now?
Its the alpha masking that makes it sooo expensive. Spring can render 500 BAR jammer towers (2k tri's each) at 30 fps. With shadows and AA on.
Re: are features expensive now?
I don't know if I can find that version of gunmetalFLOZi wrote:On the same map?smoth wrote:I was able to play with higher fps years ago on an LESSER machine. Now it is really low. Do you really think the fade is hurting it that much? is there a way to turn it off to test?