Bug: Strata Source doesn't like it if 7.6 aux compression resource is "in the wrong place."
Describe the bug
It is hard to explain, but if VTF Aux compression is not set when the VTF is first generated (using VTFLib) for instance by using SetVersion + SetAuxCompressionLevel (in VTFLib) Source will render the image incorrectly or even refuse to load the image.
This issue however only seems to occur with VTFs of size 1024 x 1024 or greater.
It seems to be based on position, or at least parsing. Because VTFLib itself as well as other VTF libs that can handle 7.6 load (and display) it correctly.
To Reproduce
create or grab a 7.5 VTF of size 1024x1024 or greater. use VTFLib to set version to 7.6 and aux compression level 9. save VTF. load into Source. Texture is either missing texture or has visual bugs.
Issue Map
N/A
Expected Behavior
For source to load the aux compression resource properly.
Operating System
No response
On Ozxy's request, here are some VTFs that shit the bed as a result of this issue + a VTF Edit program that can create VTFs in the first place.
lobby_tilefloor_1940_clean.zip
https://github.com/Trico-Everfire/VTF_Edit_Revitalized/releases/tag/Release_Candidate_3
How to create broken VTFs: Have a 7.5 VTF, goto tools > VTF Version Editor (Individual) compress the VTF to 7.6 + aux 9 compression. Update Version.
VTF is now broken.
After thorough testing this is not at fault of VTFLib as it just creates the resource as requested.
This is only a bug on textures with mip counts $0 < x < log_2(min(width,height))$. In vtex2 I had incorrectly defaulted the mip count to 10 instead of computing it based on texture dimensions, so textures >= 1024 x 1024 were missing their lower mips. I fixed this in vtex2 several months ago.
This is still a bug on the engine side, though. It should handle limited mip count gracefully.
This will be fixed in the next strata game release