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

FSR中计算HitMin*、HitMax*似乎存在错误 #14

Open
YaelLee opened this issue Nov 7, 2023 · 0 comments
Open

FSR中计算HitMin*、HitMax*似乎存在错误 #14

YaelLee opened this issue Nov 7, 2023 · 0 comments

Comments

@YaelLee
Copy link

YaelLee commented Nov 7, 2023

https://github.com/AngelMonica126/GraphicAlgorithm/blob/58877e6a8dba75ab171b0d89260defaffa22d047/027_FidelityFX%20Super%20Resolution/RCASPass_CS.glsl#L58C2-L60C51

在您的代码中,是使用Min4R和Max4R来计算HitMinR / HitMaxR的

float HitMinR = Min4R * (1.0f / (4.0f * Max4R));
float HitMinG = Min4G * (1.0f / (4.0f * Max4G));
float HitMinB = Min4B * (1.0f / (4.0f * Max4B));
float HitMaxR = (PeakC.x - Max4R) * (1.0f / (4.0f * Min4R + PeakC.y));
float HitMaxG = (PeakC.x - Max4G) * (1.0f / (4.0f * Min4G + PeakC.y));
float HitMaxB = (PeakC.x - Max4B) * (1.0f / (4.0f * Min4B + PeakC.y));

但是FSR的源码中,是
image

缺少了再次和中心点e计算min和max的步骤,正确应该是

float HitMinR = min(Min4R, e.r) * (1.0f / (4.0f * Max4R));
//...
float HitMaxR = (PeakC.x - max(Max4R, e.r)) * (1.0f / (4.0f * Min4R + PeakC.y));
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant