Delta-v/Content.Client/Parallax/Data
Pieter-Jan Briers 1d5a06612a
Optimize parallax VRAM usage (#37180)
* Disable parallax texture preloading

Many parallax layers are specific to a single map and will likely never be loaded for the duration of the game. Save VRAM by not loading them always.

Requires engine master

* Put generated parallax identifier in texture name

Makes it show up properly in debugging tools

* Don't load generated parallaxes multiple times

Many parallax prototypes re-use the same generated parallax configs. These generated parallaxes were being loaded multiple times at once, which was a massive waste of VRAM.

We now move these into a separate cache for deduplication. I had to write a lot of logic to handle loading cancellation and ref counting. Yay.

Also fixes some spaghetti with the previous parallax loading system: cancellation didn't work properly, give proper names to generated texture names, etc.

This saves like 100+ MB of VRAM.
2025-05-22 11:22:08 +10:00
..
GeneratedParallaxTextureSource.cs Optimize parallax VRAM usage (#37180) 2025-05-22 11:22:08 +10:00
IParallaxTextureSource.cs Optimize parallax VRAM usage (#37180) 2025-05-22 11:22:08 +10:00
ImageParallaxTextureSource.cs Remove lights compref (#19531) 2023-09-11 19:18:06 +10:00
ParallaxLayerConfig.cs Refactor serialization copying to use source generators (#19412) 2023-08-22 18:14:33 -07:00
ParallaxPrototype.cs Cleanup: Remove redundant prototype name specifications (#35793) 2025-03-19 19:30:31 +01:00