Home | History | Annotate | Download | only in ccpr

Lines Matching full:corner

38     s->codeAppendf("float2 corner = %s[%s];", pts, repetitionID);
39 vars->fCornerVars.fPoint = "corner";
41 s->codeAppendf("float2x2 vectors = float2x2(corner - %s[0 != %s ? %s - 1 : 2], "
42 "corner - %s[2 != %s ? %s + 1 : 0]);",
64 // will tell the fragment shader where the corner is located within each edge's AA box.
69 // The X component runs parallel to the edge (i.e. distance to the corner).
74 s->codeAppendf( "%s[i][0] = -dot(n, corner) + .5;", fAABoxTranslates.c_str());
79 s->codeAppendf( "%s[i][1] = -dot(n, corner) + .5;", fAABoxTranslates.c_str());
121 // This generally works, but it is a problem for corner pixels. There is a region within
122 // corner pixels that is outside both edges at the same time. This means the region has been
123 // double subtracted (once by each edge). The purpose of this shader is to fix these corner
135 f->codeAppendf( "half2 corner = %s[i];", fCornerLocationInAABoxes.fsIn());
140 f->codeAppendf( "half2 d = half2(1 - corner.x, -corner.y);");
143 f->codeAppendf( "half2 exit = corner + bisect * T;");
146 // 1. Add back the area beyond the corner that was subtracted out previously.
147 // 2. Subtract out the area beyond the corner, but under the bisector.
149 f->codeAppendf( "%s += (2 - corner.x - exit.x) * corner.y;", outputCoverage);
150 f->codeAppendf( "%s += (corner.x - 1) * exit.y;", outputCoverage);