MCPcopy Create free account
hub / github.com/RenderKit/embree / eval_quad

Method eval_quad

kernels/subdiv/patch_eval_simd.h:49–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 }
48
49 vbool eval_quad(const vbool& valid, const typename Patch::SubdividedQuadPatch* This, const vfloat& u, const vfloat& v, const float dscale, const size_t depth)
50 {
51 vbool ret = false;
52 const vbool u0_mask = u < 0.5f, u1_mask = u >= 0.5f;
53 const vbool v0_mask = v < 0.5f, v1_mask = v >= 0.5f;
54 const vbool u0v0_mask = valid & u0_mask & v0_mask;
55 const vbool u0v1_mask = valid & u0_mask & v1_mask;
56 const vbool u1v0_mask = valid & u1_mask & v0_mask;
57 const vbool u1v1_mask = valid & u1_mask & v1_mask;
58 if (any(u0v0_mask)) ret |= eval(u0v0_mask,This->child[0],2.0f*u,2.0f*v,2.0f*dscale,depth+1);
59 if (any(u1v0_mask)) ret |= eval(u1v0_mask,This->child[1],2.0f*u-1.0f,2.0f*v,2.0f*dscale,depth+1);
60 if (any(u1v1_mask)) ret |= eval(u1v1_mask,This->child[2],2.0f*u-1.0f,2.0f*v-1.0f,2.0f*dscale,depth+1);
61 if (any(u0v1_mask)) ret |= eval(u0v1_mask,This->child[3],2.0f*u,2.0f*v-1.0f,2.0f*dscale,depth+1);
62 return ret;
63 }
64
65 vbool eval_general(const vbool& valid, const typename Patch::SubdividedGeneralPatch* patch, const vfloat& U, const vfloat& V, const size_t depth)
66 {

Callers

nothing calls this directly

Calls 2

evalFunction · 0.70
anyFunction · 0.50

Tested by

no test coverage detected