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

Method eval_general

kernels/subdiv/patch_eval_simd.h:65–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {
67 vbool ret = false;
68 const vint l = (vint)floor(0.5f*U); const vfloat u = 2.0f*frac(0.5f*U)-0.5f;
69 const vint h = (vint)floor(0.5f*V); const vfloat v = 2.0f*frac(0.5f*V)-0.5f;
70 const vint i = (h<<2)+l; assert(all(valid,i<patch->N));
71 foreach_unique(valid,i,[&](const vbool& valid, const int i) {
72 ret |= eval(valid,patch->child[i],u,v,1.0f,depth+1);
73 });
74 return ret;
75 }
76
77 vbool eval(const vbool& valid, Ref This, const vfloat& u, const vfloat& v, const float dscale, const size_t depth)
78 {

Callers

nothing calls this directly

Calls 5

foreach_uniqueFunction · 0.85
evalFunction · 0.70
floorFunction · 0.50
fracFunction · 0.50
allFunction · 0.50

Tested by

no test coverage detected