-
Notifications
You must be signed in to change notification settings - Fork 418
Update AdaptiveSharpen, Colourfulness, FXAA, SMAA #63
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure what this change does. It reduces the distance between the two samples the delta is calculated of, but why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if it helps but this is the commit for that particular change with explanation. :)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Under luma edge detection the Calculate left-left and top-top deltas are computed with left & leftleft and top & toptop pixels ( line 730 ). But for the Color Edge Detection it uses the center pixel instead of the left and top one. Both ways cant be correct! Im not so sure anymore which one is correct, perhaps I should send a mail to Jorge Jimenez and ask politely. |
||
| 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: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use the square of the color?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lightness/luma weights should be multiplied with the color in linear light to be correct. It can be done in gamma light with some error but the speed difference is negligible.
Before, color was decoded with sRGB gamma and then encoded in the alpha channel with 1/2.0 gamma, resulting in slight error in lightness. Now its decoded with 2.0 gamma and encoded with 1/2.0 gamma.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. I see. Didn't realize the change in the line right above.