momentum-mod / game

Momentum Mod - Standalone Source Movement Speedrunning (READ README)
https://momentum-mod.org
Other
528 stars 209 forks source link

VMT Parameter for controlling mipmaps on a texture #1378

Open EthanV-3D opened 3 years ago

EthanV-3D commented 3 years ago

Is your feature request related to a problem? Please describe. Would be very convenient to have control over this within the VMT. Currently you have to re-export the .vtf with mipmaps turned off in VTFedit, which is fairly cumbersome.

Describe the solution you'd like $mipmaps 0 or 1

jason-e commented 3 years ago

Do you often need to use the same texture with mipmaps on and with them off?

EthanV-3D commented 3 years ago

Not that often but for certain cases, it helps with testing if mips are causing issues/lets you quickly disable mips without re-making a texture, and disabling them through the parameters seems like functionality that should be included anyway.

jason-e commented 3 years ago

Maybe a better solution would be a convar that disables all mipmaps for testing? A material parameter isn't a great alternative to removing the VTF flag since the mipmaps would still be built into the file, making it larger, and you also couldn't use it to enable mipmaps for a texture that didn't have them already. I guess it could be called $ignoremipmaps to avoid that confusion.

Gocnak commented 3 years ago

This already exists in textures via the "No mip" flag. So it would just be hooking up a material variable to turning this flag on for the given base texture(s).