MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / raytrace

Method raytrace

Source/Falcor/Scene/Scene.cpp:413–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411 }
412
413 void Scene::raytrace(RenderContext* pRenderContext, Program* pProgram, const ref<RtProgramVars>& pVars, uint3 dispatchDims)
414 {
415 FALCOR_PROFILE(pRenderContext, "raytraceScene");
416
417 FALCOR_ASSERT(pRenderContext && pProgram && pVars);
418 // Check for valid number of geometries.
419 // We either expect a single geometry (used for "dummy shared binding tables") or matching the number of geometries in the scene.
420 if (pVars->getRayTypeCount() > 0 && pVars->getGeometryCount() != 1 && pVars->getGeometryCount() != getGeometryCount())
421 {
422 logWarning("RtProgramVars geometry count mismatch");
423 }
424
425 uint32_t rayTypeCount = pVars->getRayTypeCount();
426 bindShaderDataForRaytracing(pRenderContext, pVars->getRootVar()[kParameterBlockName], rayTypeCount);
427
428 // Set ray type constant.
429 pVars->getRootVar()["DxrPerFrame"]["rayTypeCount"] = rayTypeCount;
430
431 pRenderContext->raytrace(pProgram, pVars.get(), dispatchDims.x, dispatchDims.y, dispatchDims.z);
432 }
433
434 void Scene::createMeshVao(uint32_t drawCount, const std::vector<SkinningVertexData>& skinningData)
435 {

Callers 8

tracePassMethod · 0.45
tracePassMethod · 0.45
executeMethod · 0.45
executeMethod · 0.45
executeRaytraceMethod · 0.45
executeRaytraceMethod · 0.45
executeMethod · 0.45
renderRTMethod · 0.45

Calls 5

getGeometryCountMethod · 0.80
getRootVarMethod · 0.80
getGeometryCountFunction · 0.50
logWarningFunction · 0.50
getMethod · 0.45

Tested by 1

executeMethod · 0.36