KSP-TaxiService / CommNetConstellation

A KSP add-on that transforms the CommNet network of single type into multiple constellations of different types
GNU General Public License v3.0
8 stars 8 forks source link

Rename small UI *.png files to *.truecolor #11

Closed cake-pie closed 5 years ago

cake-pie commented 5 years ago

Prevents mipmapping when GameDatabase loads the textures, which subsequently leads to blurry UI when graphics settings are not at full texture quality.

*.png @ quarter res blur

*.truecolor @ quarter res sharp

KSP-TaxiService commented 5 years ago

:x: Build CommNetConstellation 1.3.2-58-develop failed (commit https://github.com/KSP-TaxiService/CommNetConstellation/commit/f1806cfc52 by @cake-pie)

KSP-TaxiService commented 5 years ago

TIL there is a way to prevent Unity from screwing up my texture resolution. Thanks for letting me know!

Unfortunately, it doesn't work on the Sprite create button, as shown below. image

I will accept your contribution first and try to resolve the remaining blurry issue.

cake-pie commented 5 years ago

try to resolve the remaining blurry issue.

There's actually another way which is to disable mipmapping in the GameDatabase, that is more involved. I'm actually about to create a new repo for a mod to do that and push some code.

Not sure if that approach would help your situation, but if you hold off on a bit on a release we can investigate further.

cake-pie commented 5 years ago

At a very brief glance I see you have some utility functions to create new Texture2Ds.

  1. You need to use the version of the ctor that has mipmap and make sure to turn that off. example

  2. Note that if you are creating textures you need to be mindful to dispose them when no longer used. They apparently do not get GC'd.

I'll take a closer look at your code later, but for now you can give the above suggestion a shot.

KSP-TaxiService commented 5 years ago

Noted on the texture information.

I remember I found another way to make an image button with single texture some time after initial mod release, without the messy workaround of one "background" texture for each active, normal, highlight or disabled button state. I need to backtrace on how I arrive at this way.