StrataSource / Portal-2-Community-Edition

Task tracker for Portal 2: Community Edition
https://www.portal2communityedition.com
147 stars 3 forks source link

Port texture streaming from TF2 #355

Closed ghost closed 3 years ago

ghost commented 4 years ago

TF2 uses texture streaming to load weapon skins without precaching as to not make the game stutter. We could use this on all surface materials in a map as a means to speed up load times.

JJL772 commented 4 years ago

Will this have any positive impact on performance though? Apparently CSGO's texture streaming doesn't actually improve game performance at all, and I doubt Portal 2's environments are complex enough to actually benefit from texture streaming.

Regardless, it would be a cool feature to have for modders.

ghost commented 4 years ago

I kinda find that hard to believe, surely it would create a positive perf impact?

JJL772 commented 4 years ago

3kliksphilip did a benchmark on it: https://youtu.be/Ubdyf1LZBxo?t=252 Basically, the only map to see a significant performance improvement was de_dust2 (which had an improvement of 40fps, but only when the system had 16Gb of RAM). On other maps, the option had no effect. I'm not sure what's so different about dust2 compared to the other maps though.

ghost commented 4 years ago

So he didn't compare load times? I can't watch the video right now.

JJL772 commented 4 years ago

No he didn't. I might take a look at the internal filesystem implementation to determine if this feature would actually improve load times or not.

JJL772 commented 4 years ago

Reddit thread about increased load times due to texture streaming: https://www.reddit.com/r/GlobalOffensive/comments/gke006/csgos_new_texture_streaming_setting_causes_slow/ This isn't an official benchmark or anything, so take it with a grain of salt. (Also note that the poster has CSGO installed on a normal HDD, so it's possible that texture streaming works better with SSDs)

JJL772 commented 3 years ago

We are porting it from csgo now