I was unable to dig up any documentation or posts about this. So I am not sure if I have found something new or not... For all I know I have missed something, somewhere or I am just imagining things but here we go
Recently I discovered that the Set Scale action did not have the effect on performance that I thought it had. Basically I was under the impression that the performance impact was at the moment when you perform the action. However it seems that once you have set a new scale it will keep putting extra pressure on your framerate until you reset back to 1.0. I cannot see much difference between having it set at Start of Frame or at an Always condition actually...
I did a rough test by scaling ~1 000 active objects with Maximum Speed setting On and found that:
- DX9 has a steep drop from 1 000 fps to 500-600 fps.
- DX11 is a champ and barely gets a 100 framerate hit and remains in the ~900.
- DX8 has smallest drop of only ~20 frames. But its original speed was at ~250 fps so it cannot really be fairly compared to the other two
Obviously the results will vary depending on hardware. For instance on my slower device the results are much more extreme but follows the same pattern. While I cannot tell if this is intended behavior or a bug I think this could be good to know for anyone thinking of pushing a lot of real time-scaling into your projects.
I've included my test .mfa for anyone interested to compare with. You can play around with:
- Runtime Settings, switch between Display modes to see the effect.
- Toggling the first Event On/Off and check framerate difference.
- Switch out first event condition to Always and confirm similar performance.
- Press Enter to reset objects to 1.0 scale and confirm that the speed returns to normal.