mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-22 15:51:30 +11:00
SMAA: Fix color edge detection
Fix incorrect calculation of local contrast adaption in color edge detection This is the fix from PR iryoku/smaa#11
This commit is contained in:
parent
a7b7e9179d
commit
629f08f7b1
|
@ -792,11 +792,11 @@ float2 SMAAColorEdgeDetectionPS(float2 texcoord,
|
|||
|
||||
// Calculate left-left and top-top deltas:
|
||||
float3 Cleftleft = SMAASamplePoint(colorTex, offset[2].xy).rgb;
|
||||
t = abs(C - Cleftleft);
|
||||
t = abs(Cleft - Cleftleft);
|
||||
delta.z = max(max(t.r, t.g), t.b);
|
||||
|
||||
float3 Ctoptop = SMAASamplePoint(colorTex, offset[2].zw).rgb;
|
||||
t = abs(C - Ctoptop);
|
||||
t = abs(Ctop - Ctoptop);
|
||||
delta.w = max(max(t.r, t.g), t.b);
|
||||
|
||||
// Calculate the final maximum delta:
|
||||
|
|
Loading…
Reference in a new issue