linuxgurugamer / ksp_toolbar

Common API for GUI toolbars in KSP
BSD 2-Clause "Simplified" License
13 stars 14 forks source link

Request: Can we get an option to not enforce the use of unBlur? #16

Closed Galenmacil closed 5 years ago

Galenmacil commented 5 years ago

Instead of being a hard dependencies, would it be feasible to include an option somewhere to not use it? Personally, I see no reason at all to have it installed. It as problems off it's own and the author seems to have thrown the towel, so to speak...

linuxgurugamer commented 5 years ago

what do you mean by "thrown the towel"? It's there to improve performance of the toolbar mod. Removing it would degrade performance. What's your objection, other than having to install it?

Galenmacil commented 5 years ago

Thrown the towel, like the coach does in boxing: To give up. As he seems to have abandoned it.

You say it improve performance? Really? I fail to see how adding another DLL to the game is going to help with performance but I know very little about what it actually does. Can you briefly describe how it helps with performance?

On the downside, it creates aliasing/artefacts on non DDS icon file. I messaged the author in the unBlur thread about it a while ago. It actually decrease visual quality instead of improving it ...

linuxgurugamer commented 5 years ago

I can't comment on that, but the Toolbarcontroller used to read the icon files multiple times, now it is using the internal database. Beyond that, just loading the dll doesn't impact the performance of KSP

Cakepie has not been online for a couple of weeks, I can imagine several reasons for that, but not yet ready to throw in the towel. Worst case, I can fold the necessary code into the ToolbarController.

linuxgurugamer commented 5 years ago

On the downside, it creates aliasing/artefacts on non DDS icon file. I messaged the author in the unBlur thread about it a while ago. It actually decrease visual quality instead of improving it ..

Can you give me an example of this, please?

Galenmacil commented 5 years ago

If it does increase icon loading performance, without creating excessive "garbage" for the very ineffective Unity Garbage Collector, then I won't disapprove.

Here is the link to the actual post I made concerning unBlur artefacting, open the "spoiler" section of the first message on to page to see an image:

https://forum.kerbalspaceprogram.com/index.php?/topic/184268-17x-~-13x-unblur-v050-2019-06-01/page/2/

linuxgurugamer commented 5 years ago

I looked at both images, and I find it very hard to tell a difference. For example, looking at the FF button, from what I can see, every pixel is identical (inside the square)

OTOH, in stock game, I see significant issues when seeing icons on the toolbar which are loaded directly by the game for those which haven't yet been updated. This is why I originally coded the toolbarcontroller to load the files directly from disk to avoid the loss of resolution. The disadvantage is that there is some overhead for opening and reading the file every time a screen changes.

The advantage of using unBlur is that the icons are loaded by Unity/KSP, and unBlur does it's magic to stop the loss of resolution.

The one thing I know is that in the unblur page, it says that this problem doesn't show up when displaying using full-res, that is incorrect.

Galenmacil commented 5 years ago

I agree with you that the difference is minimal but even Cakepie agreed that this is not supposed to be like that. From what I see, unBlur convert uncompressed toolbar icon to DDS.

Also, in my opinion, unBlur just put a patch on an underlying "problem" which is people supplying icon for toolbar in DDS format with mipmaps. Unless you can confirm otherwise...

So, you seem to want to keep using unBlur, which is fine to fix possible low resolution icon problem. If it also allow for faster scene transition then again, I can't disagree. It is just that I dislike having to be "forced" to use yet another dependency.

In the end, the choice is yours. I am just going to reiterate that the best solution I think for both side would be to make the toolbar mod work with it, if it is detected, but not enforcing it. If it is going to make coding harder/not elegant/time consuming, I do understand you have a lot of other mods to take care of...

linuxgurugamer commented 5 years ago

Actually, based on your feedback and others, I'm seriously thinking of removing the dependency on unBlur. Besides everything else, it causes needless issues when people upgrade not realizing there is an underlying dependency.

I will probably be looking into this during my stream this evening, I'm working on both the ToolbarController and the Blizzy Toolbar, and will add this to the mix

linuxgurugamer commented 5 years ago

In beta now