CollapseLauncher / Collapse

An Advanced Launcher for miHoYo/HoYoverse Games
MIT License
1.41k stars 65 forks source link

Use Waifu2X to enlarge background image #412

Closed shatyuka closed 9 months ago

shatyuka commented 9 months ago

More testing is still needed, especially for old PCs.

Comparison: cubic waifu2x
cubic_1 waifu2x_1
cubic_2 waifu2x_2

native source code here

github-actions[bot] commented 9 months ago

Qodana for .NET

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked ☁️ View the detailed Qodana report

Contact Qodana team Contact us at [qodana-support@jetbrains.com](mailto:qodana-support@jetbrains.com) - Or via our issue tracker: https://jb.gg/qodana-issue - Or share your feedback: https://jb.gg/qodana-discussions
Cryotechnic commented 9 months ago

Just chiming in to give my own 2 cents, but Waifu2X can be resource intensive depending on the image resolution, so I would not recommend using machines that do not have the following specifications:

I think that covers it?

bagusnl commented 9 months ago

Just chiming in to give my own 2 cents, but Waifu2X can be resource intensive depending on the image resolution, so I would not recommend using machines that do not have the following specifications:

As long as its toggleable between the current implementation (MagicScaler) and w2x I'm fine with it. Especially due to the nature of w2x

As for minimum specs, since the binary used is ncnn it just need Vulkan support, and if you can run hpyo games without any intervention it should be all ok. Tho a proper check if vulkan is available when toggling it on (like invoking vulkaninfo and just looking for the ERRORLEVEL shall do IMO).

Also do note that some AMD iGPU users like me suffers a driver degradation where any ncnn scaler will give a blank 0b output without the ncnn giving out error itself, so you might want to check if the output is a valid image and do a proper fallback when it doesn't

shatyuka commented 9 months ago

Just chiming in to give my own 2 cents, but Waifu2X can be resource intensive depending on the image resolution, so I would not recommend using machines that do not have the following specifications:

In fact, Collapse can only run on systems above Windows 10, so in most cases there is no need to consider system version compatibility issues.

For supported GPUs, I think this is already checked in native. For example, the Vulkan Loader (vulkan-1.dll) fails to load, or the Vulkan api returns an error code. This toggle is disabled when native library fails to load.

Also I will add some extra checks for black or corrupted image.

bagusnl commented 9 months ago

Can I get the source for the OpenMP? I need the license file to be added manually as its not from NuGet

shatyuka commented 9 months ago

Can I get the source for the OpenMP? I need the license file to be added manually as its not from NuGet

https://github.com/llvm/llvm-project/blob/main/openmp/LICENSE.TXT

libomp binary file is copied from vcredist

bagusnl commented 9 months ago

Tested and works great!

image

As per internal discussion, we can merge this PR now~ Thank you for your work