Lines Matching refs:codeAppend
312 v->codeAppend("float2 corner = corner_and_radius_outsets.xy;"); in onEmitCode()
313 v->codeAppend("float2 radius_outset = corner_and_radius_outsets.zw;"); in onEmitCode()
314 v->codeAppend("float2 aa_bloat_direction = aa_bloat_and_coverage.xy;"); in onEmitCode()
315 v->codeAppend("float coverage = aa_bloat_and_coverage.z;"); in onEmitCode()
316 v->codeAppend("float is_linear_coverage = aa_bloat_and_coverage.w;"); in onEmitCode()
319 v->codeAppend("float2 pixellength = inversesqrt(" in onEmitCode()
321 v->codeAppend("float4 normalized_axis_dirs = skew * pixellength.xyxy;"); in onEmitCode()
322 v->codeAppend("float2 axiswidths = (abs(normalized_axis_dirs.xy) + " in onEmitCode()
324 v->codeAppend("float2 aa_bloatradius = axiswidths * pixellength * .5;"); in onEmitCode()
327 v->codeAppend("float4 radii_and_neighbors = radii_selector" in onEmitCode()
329 v->codeAppend("float2 radii = radii_and_neighbors.xy;"); in onEmitCode()
330 v->codeAppend("float2 neighbor_radii = radii_and_neighbors.zw;"); in onEmitCode()
332 v->codeAppend("if (any(greaterThan(aa_bloatradius, float2(1)))) {"); in onEmitCode()
337 v->codeAppend( "corner = max(abs(corner), aa_bloatradius) * sign(corner);"); in onEmitCode()
338 v->codeAppend( "coverage /= max(aa_bloatradius.x, 1) * max(aa_bloatradius.y, 1);"); in onEmitCode()
341 v->codeAppend( "radii = float2(0);"); in onEmitCode()
342 v->codeAppend("}"); in onEmitCode()
344 v->codeAppend("if (any(lessThan(radii, aa_bloatradius * 1.25))) {"); in onEmitCode()
346 v->codeAppend( "radii = aa_bloatradius;"); in onEmitCode()
348 v->codeAppend( "radius_outset = floor(abs(radius_outset)) * radius_outset;"); in onEmitCode()
349 v->codeAppend( "is_linear_coverage = 1;"); in onEmitCode()
350 v->codeAppend("} else {"); in onEmitCode()
352 v->codeAppend( "radii = clamp(radii, pixellength, 2 - pixellength);"); in onEmitCode()
353 v->codeAppend( "neighbor_radii = clamp(neighbor_radii, pixellength, 2 - pixellength);"); in onEmitCode()
355 v->codeAppend( "float2 spacing = 2 - radii - neighbor_radii;"); in onEmitCode()
356 v->codeAppend( "float2 extra_pad = max(pixellength * .0625 - spacing, float2(0));"); in onEmitCode()
357 v->codeAppend( "radii -= extra_pad * .5;"); in onEmitCode()
358 v->codeAppend("}"); in onEmitCode()
362 v->codeAppend("float2 aa_outset = aa_bloat_direction.xy * aa_bloatradius;"); in onEmitCode()
363 v->codeAppend("float2 vertexpos = corner + radius_outset * radii + aa_outset;"); in onEmitCode()
368 v->codeAppend("float2 localcoord = (local_rect.xy * (1 - vertexpos) + " in onEmitCode()
376 v->codeAppend("float2x2 skewmatrix = float2x2(skew.xy, skew.zw);"); in onEmitCode()
377 v->codeAppend("float2 devcoord = vertexpos * skewmatrix + translate;"); in onEmitCode()
383 v->codeAppend("if (0 != is_linear_coverage) {"); in onEmitCode()
387 v->codeAppend("} else {"); in onEmitCode()
390 v->codeAppend( "float2 arccoord = 1 - abs(radius_outset) + aa_outset/radii * corner;"); in onEmitCode()
400 v->codeAppend("}"); in onEmitCode()