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

Function convertScene

tutorials/pathtracer/pathtracer_device.cpp:944–973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

942typedef ISPCGeometry* ISPCGeometry_ptr;
943
944RTCScene convertScene(ISPCScene* scene_in)
945{
946 for (unsigned int i=0; i<scene_in->numGeometries; i++)
947 {
948 ISPCGeometry* geometry = scene_in->geometries[i];
949 if (geometry->type == SUBDIV_MESH) {
950 g_subdiv_mode = true; break;
951 }
952 }
953
954 assignShadersFunc = assignShaders;
955
956 RTCScene scene_out = ConvertScene(g_device, g_ispc_scene, RTC_BUILD_QUALITY_MEDIUM, RTC_SCENE_FLAG_NONE, &g_used_features);
957#if ENABLE_FILTER_FUNCTION
958#if USE_ARGUMENT_CALLBACKS
959 g_used_features = (RTCFeatureFlags)(g_used_features | RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS);
960#else
961 g_used_features = (RTCFeatureFlags)(g_used_features | RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_GEOMETRY);
962#endif
963#endif
964
965 /* commit changes to scene */
966 //progressStart();
967 //rtcSetSceneProgressMonitorFunction(scene_out,progressMonitor,nullptr);
968 rtcCommitScene (scene_out);
969 //rtcSetSceneProgressMonitorFunction(scene_out,nullptr,nullptr);
970 //progressEnd();
971
972 return scene_out;
973} // convertScene
974
975inline Vec3fa face_forward(const Vec3fa& dir, const Vec3fa& _Ng) {
976 const Vec3fa Ng = _Ng;

Callers 1

device_renderFunction · 0.70

Calls 2

ConvertSceneFunction · 0.85
rtcCommitSceneFunction · 0.85

Tested by

no test coverage detected