mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-26 09:21:30 +11:00
fix crt-guest-dr-venom-fast smoothing pass
This commit is contained in:
parent
12fdb6562f
commit
e5f2818021
|
@ -60,8 +60,10 @@ layout(set = 0, binding = 2) uniform sampler2D Source;
|
|||
|
||||
float df (vec3 A, vec3 B)
|
||||
{
|
||||
float diff = abs(A-B); float m = max(max(diff.r,diff.g),diff.b);
|
||||
return smoothstep(0.0, 0.99, m);
|
||||
float diff = length(A-B);
|
||||
float luma = clamp(length(0.5*min(A,B) + 0.25*(A+B) + 1e-8), 0.0001, 1.0);
|
||||
float diff1 = diff/luma;
|
||||
return 1.0 - clamp(7.0*(max(1.5*diff,diff1)-STH), 0.0, 1.0);
|
||||
}
|
||||
|
||||
void main()
|
||||
|
@ -79,4 +81,4 @@ void main()
|
|||
float resx = dl; float resy = dr;
|
||||
|
||||
FragColor = vec4(resx,resy,1.0,1.0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue