Lines Matching refs:codeAppend
513 v->codeAppend("float2 corner = corner_and_radius_outsets.xy;"); in onEmitCode()
514 v->codeAppend("float2 radius_outset = corner_and_radius_outsets.zw;"); in onEmitCode()
515 v->codeAppend("float2 aa_bloat_direction = aa_bloat_and_coverage.xy;"); in onEmitCode()
516 v->codeAppend("float is_linear_coverage = aa_bloat_and_coverage.w;"); in onEmitCode()
519 v->codeAppend("float2 pixellength = inversesqrt(" in onEmitCode()
521 v->codeAppend("float4 normalized_axis_dirs = skew * pixellength.xyxy;"); in onEmitCode()
522 v->codeAppend("float2 axiswidths = (abs(normalized_axis_dirs.xy) + " in onEmitCode()
524 v->codeAppend("float2 aa_bloatradius = axiswidths * pixellength * .5;"); in onEmitCode()
527 v->codeAppend("float4 radii_and_neighbors = radii_selector" in onEmitCode()
529 v->codeAppend("float2 radii = radii_and_neighbors.xy;"); in onEmitCode()
530 v->codeAppend("float2 neighbor_radii = radii_and_neighbors.zw;"); in onEmitCode()
532 v->codeAppend("float coverage_multiplier = 1;"); in onEmitCode()
533 v->codeAppend("if (any(greaterThan(aa_bloatradius, float2(1)))) {"); in onEmitCode()
538 v->codeAppend( "corner = max(abs(corner), aa_bloatradius) * sign(corner);"); in onEmitCode()
539 v->codeAppend( "coverage_multiplier = 1 / (max(aa_bloatradius.x, 1) * " in onEmitCode()
543 v->codeAppend( "radii = float2(0);"); in onEmitCode()
544 v->codeAppend("}"); in onEmitCode()
547 v->codeAppend("float coverage = aa_bloat_and_coverage.z;"); in onEmitCode()
553 v->codeAppend("if (any(lessThan(radii, aa_bloatradius * 1.5))) {"); in onEmitCode()
555 v->codeAppend( "radii = float2(0);"); in onEmitCode()
558 v->codeAppend( "aa_bloat_direction = sign(corner);"); in onEmitCode()
559 v->codeAppend( "if (coverage > .5) {"); // Are we an inset edge? in onEmitCode()
560 v->codeAppend( "aa_bloat_direction = -aa_bloat_direction;"); in onEmitCode()
561 v->codeAppend( "}"); in onEmitCode()
562 v->codeAppend( "is_linear_coverage = 1;"); in onEmitCode()
563 v->codeAppend("} else {"); in onEmitCode()
567 v->codeAppend( "radii = clamp(radii, pixellength * 1.5, 2 - pixellength * 1.5);"); in onEmitCode()
568 v->codeAppend( "neighbor_radii = clamp(neighbor_radii, pixellength * 1.5, " in onEmitCode()
571 v->codeAppend( "float2 spacing = 2 - radii - neighbor_radii;"); in onEmitCode()
572 v->codeAppend( "float2 extra_pad = max(pixellength * .0625 - spacing, float2(0));"); in onEmitCode()
573 v->codeAppend( "radii -= extra_pad * .5;"); in onEmitCode()
574 v->codeAppend("}"); in onEmitCode()
578 v->codeAppend("float2 aa_outset = " in onEmitCode()
580 v->codeAppend("float2 vertexpos = corner + radius_outset * radii + aa_outset;"); in onEmitCode()
582 v->codeAppend("if (coverage > .5) {"); // Are we an inset edge? in onEmitCode()
587 v->codeAppend( "if (aa_bloat_direction.x != 0 && vertexpos.x * corner.x < 0) {"); in onEmitCode()
588 v->codeAppend( "float backset = abs(vertexpos.x);"); in onEmitCode()
589 v->codeAppend( "vertexpos.x = 0;"); in onEmitCode()
590 v->codeAppend( "vertexpos.y += " in onEmitCode()
592 v->codeAppend( "coverage = (coverage - .5) * abs(corner.x) / " in onEmitCode()
594 v->codeAppend( "}"); in onEmitCode()
595 v->codeAppend( "if (aa_bloat_direction.y != 0 && vertexpos.y * corner.y < 0) {"); in onEmitCode()
596 v->codeAppend( "float backset = abs(vertexpos.y);"); in onEmitCode()
597 v->codeAppend( "vertexpos.y = 0;"); in onEmitCode()
598 v->codeAppend( "vertexpos.x += " in onEmitCode()
600 v->codeAppend( "coverage = (coverage - .5) * abs(corner.y) / " in onEmitCode()
602 v->codeAppend( "}"); in onEmitCode()
603 v->codeAppend("}"); in onEmitCode()
608 v->codeAppend("float2 localcoord = (local_rect.xy * (1 - vertexpos) + " in onEmitCode()
614 v->codeAppend("float2x2 skewmatrix = float2x2(skew.xy, skew.zw);"); in onEmitCode()
615 v->codeAppend("float2 devcoord = vertexpos * skewmatrix + translate;"); in onEmitCode()
621 v->codeAppend("if (0 != is_linear_coverage) {"); in onEmitCode()
626 v->codeAppend("} else {"); in onEmitCode()
629 v->codeAppend( "float2 arccoord = 1 - abs(radius_outset) + aa_outset/radii * corner;"); in onEmitCode()
639 v->codeAppend("}"); in onEmitCode()