Lines Matching refs:codeAppendf
105 v->codeAppendf("float2x2 R = float2x2(cos(.05), sin(.05), -sin(.05), cos(.05));"); in onEmitCode()
107 v->codeAppendf("%s = bboxcoord * 1.25;", squircleCoord.vsOut()); in onEmitCode()
108 v->codeAppendf("float3 vertexpos = float3(bboxcoord * 100 * R + 100, 1);"); in onEmitCode()
109 v->codeAppendf("vertexpos = %s * vertexpos;", uniforms->getUniformCStr(fViewMatrixHandle)); in onEmitCode()
113 f->codeAppendf("float golden_ratio = 1.61803398875;"); in onEmitCode()
114 f->codeAppendf("float pi = 3.141592653589793;"); in onEmitCode()
115 f->codeAppendf("float x = abs(%s.x), y = abs(%s.y);", in onEmitCode()
119 f->codeAppendf("float fn = half(pow(x, golden_ratio*pi) + pow(y, golden_ratio*pi) - 1);"); in onEmitCode()
120 f->codeAppendf("float fnwidth = fwidth(fn);"); in onEmitCode()
121 f->codeAppendf("fnwidth += 1e-10;"); // Guard against divide-by-zero. in onEmitCode()
122 f->codeAppendf("half coverage = clamp(half(.5 - fn/fnwidth), 0, 1);"); in onEmitCode()
124 f->codeAppendf("half4 %s = half4(.51, .42, .71, 1) * .89;", args.fOutputColor); in onEmitCode()
125 f->codeAppendf("half4 %s = half4(coverage);", args.fOutputCoverage); in onEmitCode()