Skip to content

Commit 7dc88fb

Browse files
committed
Fix local contrast adaption not correctly working in color edge detection
This bug came from original GLSL version. See the corresponding bug report: iryoku/smaa#11
1 parent 231a9d2 commit 7dc88fb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

smaa.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ void PixelShader::colorEdgeDetection(int x, int y,
288288
float Cleftleft[4], Ctoptop[4];
289289
colorImage->getPixel(x - 2, y, Cleftleft);
290290
colorImage->getPixel(x, y - 2, Ctoptop);
291-
float Dleftleft = color_delta(C, Cleftleft);
292-
float Dtoptop = color_delta(C, Ctoptop);
291+
float Dleftleft = color_delta(Cleft, Cleftleft);
292+
float Dtoptop = color_delta(Ctop, Ctoptop);
293293

294294
/* Calculate the maximum delta: */
295295
float maxDelta_x = fmaxf(fmaxf(Dleft, Dright), Dleftleft);

0 commit comments

Comments
 (0)