inline virtual void invoke(GLint colorTextureUnit, size_t width, size_t height, const magnet::GL::Camera& vp) { _filter.attach(); _filter["u_Texture0"] = colorTextureUnit; _filter["u_Texture1"] = 0; _filter["u_Texture2"] = 2; _filter["nearDist"] = vp.getZNear(); _filter["farDist"] = vp.getZFar(); _filter["focalDistance"] = _focalLength; _filter["focalRange"] = _focalWidth; _filter.invoke(); _filter.detach(); }
void RTSpheres::sortTick(const magnet::GL::Camera& camera) { cl_float4 campos = getclVec(camera.getEyeLocation()); cl_float4 camdir = getclVec(camera.getCameraDirection()); cl_float4 camup = getclVec(camera.getCameraUp()); //Generate the sort data _sortDataKernelFunc(_spherePositions, _sortKeys, _sortData, campos, camdir, camup, (cl_float)camera.getAspectRatio(), (cl_float)camera.getZNear(), (cl_float)camera.getFOVY(), _N); if ((_renderDetailLevels.size() > 2) || (_renderDetailLevels.front()._nSpheres != _N)) sortFunctor(_sortKeys, _sortData); recolor(); }