StrataSource / vtex2

A VTF converter and editor
MIT License
44 stars 8 forks source link

[Feature] Support fading mipmaps ("mipblend") #39

Open SirYodaJedi opened 8 months ago

SirYodaJedi commented 8 months ago

Since Source 2007, Valve's vtex supports a compile parameter mipblend, which poorly documented. I noticed that it can be used for making greyscale detail textures less noisy, so I looked at vtex_dll.dll in a hex editor and tested what appeared to be the parameters, documenting my findings:

image

Unfortunately, vtex can't actually create I8 (or ATI1N) textures, and vtex2 doesn't currently seem to have an option to retain existing mipmaps from an input file (currently only a VTF would have pre-existing mipmaps, but if DDS support ever gets added, that could also have mipmaps).