Lines Matching refs:fragBuilder
123 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local
124 const char* fragmentPos = fragBuilder->fragmentPosition(); in emitCode()
132 fragBuilder->codeAppendf("float d = (length((%s.xy - %s.xy) * %s.w) - 1.0) * %s.z;", in emitCode()
135 fragBuilder->codeAppendf("float d = (1.0 - length((%s.xy - %s.xy) * %s.w)) * %s.z;", in emitCode()
139 fragBuilder->codeAppend("d = clamp(d, 0.0, 1.0);"); in emitCode()
141 fragBuilder->codeAppend("d = d > 0.5 ? 1.0 : 0.0;"); in emitCode()
144 fragBuilder->codeAppendf("%s = %s;", args.fOutputColor, in emitCode()
304 GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; in emitCode() local
305 const char* fragmentPos = fragBuilder->fragmentPosition(); in emitCode()
308 fragBuilder->codeAppendf("vec2 d = %s.xy - %s.xy;", fragmentPos, ellipseName); in emitCode()
310 fragBuilder->codeAppendf("d *= %s.y;", scaleName); in emitCode()
312 fragBuilder->codeAppendf("vec2 Z = d * %s.zw;", ellipseName); in emitCode()
314 fragBuilder->codeAppend("float implicit = dot(Z, d) - 1.0;"); in emitCode()
316 fragBuilder->codeAppendf("float grad_dot = 4.0 * dot(Z, Z);"); in emitCode()
318 fragBuilder->codeAppend("grad_dot = max(grad_dot, 1.0e-4);"); in emitCode()
319 fragBuilder->codeAppendf("float approx_dist = implicit * inversesqrt(grad_dot);"); in emitCode()
321 fragBuilder->codeAppendf("approx_dist *= %s.x;", scaleName); in emitCode()
326 fragBuilder->codeAppend("float alpha = clamp(0.5 - approx_dist, 0.0, 1.0);"); in emitCode()
329 fragBuilder->codeAppend("float alpha = clamp(0.5 + approx_dist, 0.0, 1.0);"); in emitCode()
332 fragBuilder->codeAppend("float alpha = approx_dist > 0.0 ? 0.0 : 1.0;"); in emitCode()
335 fragBuilder->codeAppend("float alpha = approx_dist > 0.0 ? 1.0 : 0.0;"); in emitCode()
341 fragBuilder->codeAppendf("%s = %s;", args.fOutputColor, in emitCode()