Implement texture compression and downscaling optimizations#1337
Conversation
|
oops, this must be a PR draft 😅 |
|
My initial thoughts would be that this whilst interesting I'm not sure this is really going to give us any decent gains if developers have actually optimised properly. You could possible compress the in-memory texture to DXT on load and copy the compressed data direct to VRAM, but that would probably come with re-writing the entire texture class. The 'normal' problem trains in terms of RAM / VRAM are NYCTA content, such as those from here: Essentially, they're an absolute disaster zone in terms of texture sizing (most way too big, and not to power of 2 either), total texture counts, and general practices. |
WIP, only tested on windows with object viewer, route viewer and main program.
Just realize opengl technically support texture compression such as BC1 / DXT, if we use this this should use less RAM/VRAM
currently not have UI, needs to write manually the setting in the options.cfg or options_ov.cfg or options_rv.cfg under [Quality] sections.
max texture will downscale only the texture if greater than the resolution specified.
currently i use console logs for estimating the memory savings, AFAIK it wont drop the ram usage immediately, we need to wait the next GC sweep. Also, compressing and downscaling needs time, it will make the loading longer.