Lines Matching refs:codeAppendf
74 v->codeAppendf("float2x2 R = float2x2(cos(.05), sin(.05), -sin(.05), cos(.05));"); in onEmitCode()
76 v->codeAppendf("%s = bboxcoord * 1.25;", squircleCoord.vsOut()); in onEmitCode()
77 v->codeAppendf("float3 vertexpos = float3(bboxcoord * 100 * R + 100, 1);"); in onEmitCode()
78 v->codeAppendf("vertexpos = %s * vertexpos;", uniforms->getUniformCStr(fViewMatrixHandle)); in onEmitCode()
82 f->codeAppendf("float golden_ratio = 1.61803398875;"); in onEmitCode()
83 f->codeAppendf("float pi = 3.141592653589793;"); in onEmitCode()
84 f->codeAppendf("float x = abs(%s.x), y = abs(%s.y);", in onEmitCode()
88 f->codeAppendf("float fn = pow(x, golden_ratio*pi) + pow(y, golden_ratio*pi) - 1;"); in onEmitCode()
89 f->codeAppendf("float fnwidth = fwidth(fn);"); in onEmitCode()
90 f->codeAppendf("fnwidth += 1e-10;"); // Guard against divide-by-zero. in onEmitCode()
91 f->codeAppendf("half coverage = clamp(.5 - fn/fnwidth, 0, 1);"); in onEmitCode()
93 f->codeAppendf("%s = half4(.51, .42, .71, 1) * .89;", args.fOutputColor); in onEmitCode()
94 f->codeAppendf("%s = half4(coverage);", args.fOutputCoverage); in onEmitCode()