Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Anime4K_Restore_S variant #693

Merged
merged 6 commits into from
Aug 2, 2023
Merged

Port Anime4K_Restore_S variant #693

merged 6 commits into from
Aug 2, 2023

Conversation

IsaiasYang
Copy link
Contributor

参考此前的PR移植了Anime4K_Restore_S,降低对低端硬件的性能开销。

在寨板上推一些早年的Gal时,使用Anime4K_Upscale进行缩放能够得到比较好的效果,却也完全舍弃了更符合直觉的触摸操作。就我个人的使用情况而言,直接设置全屏并使用Anime4K_Restore还原线性缩放带来的模糊,效果上也能暂且作为一种折中方案。不过已有的滤镜中最低档也只有Anime4K_Restore_M,仍然对寨板和掌机这些手持设备的续航有较大影响,就简单做了下Anime4K_Restore_S的移植,更希望开发者能早日解决触控映射的问题。

@Blinue
Copy link
Owner

Blinue commented Aug 1, 2023

谢谢贡献!关于触控映射我有一个计划 #218 (comment) ,但暂时不会着手实现。

//!PASS 3
//!DESC Conv-4x3x3x8
//!IN tex2
//!OUT tex3
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以复用 tex1,因此 tex3 是不需要的

@Blinue
Copy link
Owner

Blinue commented Aug 1, 2023

在我的测试里比 Anime4K_Restore_M 快一倍,画质差异很小。你能顺便把 Anime4K_Restore_CNN_Soft_S 也移植了吗?结构是一样的,只需复制参数即可。

@IsaiasYang
Copy link
Contributor Author

之前在Anime4K那边的文档看到Soft变体主要应用于下采样带来的锯齿,也就没有一并关注,现已补上。

不过我自己并不是很了解Shader的处理方式,纹理复用这块可能还是要你修改一下。比如我就理解不了为什么可以复用(

@Blinue
Copy link
Owner

Blinue commented Aug 1, 2023

Soft 变体不会过度锐化,我个人比较喜欢。

tex1 之所以可以复用,是因为 Pass 2 之后就不会再使用它了,Pass 3 可以直接写入 tex1 覆盖数据。

原始:INPUT->tex1->tex2->tex3->OUTPUT
优化后:INPUT->tex1->tex2->tex1->OUTPUT

很容易修改,将 tex3 文本替换为 tex1,然后删除多余的 tex3 纹理即可。

@Blinue
Copy link
Owner

Blinue commented Aug 2, 2023

我认为可以合并了,你还有要改的吗?

@IsaiasYang
Copy link
Contributor Author

就这样吧,那应该可以了。

@Blinue Blinue merged commit d74a2ae into Blinue:dev Aug 2, 2023
1 check passed
@Blinue
Copy link
Owner

Blinue commented Aug 2, 2023

@all-contributors
Please add @IsaiasYang for code.

@allcontributors
Copy link
Contributor

@Blinue

I've put up a pull request to add @IsaiasYang! 🎉

@IsaiasYang IsaiasYang deleted the Anime4K_Restore_S branch August 2, 2023 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants