Lines Matching refs:codeAppend

25     s->codeAppend ("float D3 = +determinant(float2x2(C[0].yz, C[1].yz));");  in emitSetupCode()
26 s->codeAppend ("float D2 = -determinant(float2x2(C[0].xz, C[1].xz));"); in emitSetupCode()
27 s->codeAppend ("float D1 = +determinant(float2x2(C));"); in emitSetupCode()
31 s->codeAppend ("float Dmax = max(max(abs(D1), abs(D2)), abs(D3));"); in emitSetupCode()
32 s->codeAppend ("float norm;"); in emitSetupCode()
34 s->codeAppend ("int exp;"); in emitSetupCode()
35 s->codeAppend ("frexp(Dmax, exp);"); in emitSetupCode()
36 s->codeAppend ("norm = ldexp(1, 1 - exp);"); in emitSetupCode()
38 s->codeAppend ("norm = 1/Dmax;"); // Dmax will not be 0 because we cull line cubics on CPU. in emitSetupCode()
40 s->codeAppend ("D3 *= norm;"); in emitSetupCode()
41 s->codeAppend ("D2 *= norm;"); in emitSetupCode()
42 s->codeAppend ("D1 *= norm;"); in emitSetupCode()
46 s->codeAppend ("float discr = 3*D2*D2 - 4*D1*D3;"); in emitSetupCode()
47 s->codeAppend ("float x = discr >= 0 ? 3 : 1;"); in emitSetupCode()
48 s->codeAppend ("float q = sqrt(x * abs(discr));"); in emitSetupCode()
49 s->codeAppend ("q = x*D2 + (D2 >= 0 ? q : -q);"); in emitSetupCode()
51 s->codeAppend ("float2 l, m;"); in emitSetupCode()
52 s->codeAppend ("l.ts = float2(q, 2*x * D1);"); in emitSetupCode()
53 s->codeAppend ("m.ts = float2(2, q) * (discr >= 0 ? float2(D3, 1) " in emitSetupCode()
56 s->codeAppend ("float4 K;"); in emitSetupCode()
57 s->codeAppend ("float4 lm = l.sstt * m.stst;"); in emitSetupCode()
58 s->codeAppend ("K = float4(0, lm.x, -lm.y - lm.z, lm.w);"); in emitSetupCode()
60 s->codeAppend ("float4 L, M;"); in emitSetupCode()
61 s->codeAppend ("lm.yz += 2*lm.zy;"); in emitSetupCode()
62 s->codeAppend ("L = float4(-1,x,-x,1) * l.sstt * (discr >= 0 ? l.ssst * l.sttt : lm);"); in emitSetupCode()
63 s->codeAppend ("M = float4(-1,x,-x,1) * m.sstt * (discr >= 0 ? m.ssst * m.sttt : lm.xzyw);"); in emitSetupCode()
65 s->codeAppend ("int middlerow = abs(D2) > abs(D1) ? 2 : 1;"); in emitSetupCode()
66 s->codeAppend ("float3x3 CI = inverse(float3x3(C[0][0], C[0][middlerow], C[0][3], " in emitSetupCode()
131 f->codeAppend ("half wind = sign(l + m);"); in onEmitFragmentCode()