SMAADetectHorizontalCornerPattern
修正水平转角
//-----------------------------------------------------------------------------
// Corner Detection Functions
void SMAADetectHorizontalCornerPattern(SMAATexture2D(edgesTex), inout float2 weights, float4 texcoord, float2 d) {
// ...
}
判断左右
float2 leftRight = step(d.xy, d.yx);
锯齿:
转角:
对比两图上半部分:
左:texcoord.xy + (0, -2) 存在左边界时是转角
右:texcoord.zw + (1, -2) 存在左边界时是转角
对比两图下半部分:
左:texcoord.xy + (0, 1) 存在左边界时是转角
右:texcoord.zw + (1, 1) 存在左边界时是转角