Sorry for this fix / patching being so late coming! I haven't been too active in the community and been busy with university and with work, so I haven't been putting in much time at all for tf2 stuff. I figured it was long overdue though so I made an effort to get to it.
The issues people have been having with resized flat textures should be fixed now, at least this is the case for everyone I've tried it with*. In addition, resized flat textures should appear flat** on sv_pure too, like the private flat textures mod that a few players have been using recently. I've also added the resized flat textures as a release for people who just want to download that, or if they're experiencing any more issues generating it.
Link for the direct download of flat textures here: https://github.com/JarateKing/CleanTF2plus/releases/download/1.0.0/flat_textures.vpk
* thank you members of the huds.tf and mastercomfig discord servers who volunteered to help on short notice, particularly Horse, jan, and Ta5k, in addition to the many other participants in other conversations about flat textures
** if you are close to textures you'll notice that they're not fully flat, but at any reasonable distance they will be. If you look at videos with the private mod, you'll notice the same thing.
Technical details:
- I was an idiot that used DXT compression for textures smaller than 4x4, when DXT compression works by dividing textures into 4x4 segments. Rookie mistake. I don't know why I wasn't getting the same issue on my machine, or why different machines seemed to have different issues. Switching to an uncompressed format (BGR888 and ABGR8888) should fix this. Unfortunately this means that if you choose not to resize textures, the filesize (and by extension load times and memory usage) will also increase -- it would be possible to optimize this for unresized textures but I don't think this is a dealbreaker, I'd wager most people will choose to resize.
- Making flat textures appear flat in sv_pure is a matter of enabling mipmaps, specifically what was done was setting the texture flag to enable mipmaps below 32x32. This does mean that if you look closely at textures you'll notice that they're not actually flat and instead are just resized down heavily (this has always been the case), but at a distance they appear / become flat (versus in the past where they would become grainey). As far as I understand it, the private flat textures mod uses the same technique (or maybe a slightly worse implementation of the same idea), and I've been told it's even a modification of CleanTF2+. But I was never given access to the mod so I can't be sure. I'm not really sure why someone would take a public open-source project, make a fix and improvement, and then not push the changes or get in touch with the original author. Though maybe they did try and get in touch but just weren't able to reach me :B
- There is a known issue where some flattened textures appear darker in sv_pure 0 now. I have some suspected leads but I figured it's more important to get something working out there, especially considering how many people interested in the mod are not the types who regularly play on sv_pure 0 servers.
Now why either of these things matter in sv_pure, where it should (and is) using the stock default textures using their own encoding and their own mipmaps, I have no clue. Not only that, but it seems silly to enable mipmap generation on textures that are already 1x1 and therefore can't have any mipmaps. How the source engine handles textures applied to brushes in sv_pure is full of mysteries. But it is what it is.
For league admins:
I don't believe this offers any actual, cheaty advantages -- it cleans things up and hypothetically leads to slight fps improvements (I haven't benchmarked but the common wisdom is smaller textures and mipmaps = better memory locality within GPUs = less cache misses = better performance GPU-side) without doing anything that offers material gameplay benefits. And likewise I doubt valve really cares either, since these flat textures rely on the same fundamental techniques as the old clean tf2 flat textures did (as well as at least one earlier flat textures mod), so we're talking about public methods that have been around for over half a decade now. But it's just the nature of CleanTF2+ that a lot of it runs in a gray area of what is acceptable and what is an exploit.
A lot of my stuff in the past has caused issues for leagues, and I've put in effort to make sure CleanTF2+ doesn't violate league rules, but I also know that I'm not very active anymore (outside of the huds.tf and mastercomfig discords, which would be the best bet to contact me) so if I'm not kept in the loop then CleanTF2+ might not be updated for some time (the metal footsteps being one example). I'm glad to help so if there are any league concerns about these, feel free to contact me through discord as that'll be the easiest.