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

Method addHitGroup

Source/Falcor/Core/Program/Program.h:496–519  ·  view source on GitHub ↗

* Add a hit group. * A hit group consists of any combination of closest hit, any hit, and intersection shaders. * Note that a hit group that contains an intersection shader only be used with procedural geometry. * A hit group that does not contain an intersection shader can only be used with triangle geometry. * It is valid to create a hit group entirely without entry points. G

Source from the content-addressed store, hash-verified

494 * @return Shader ID for hit group. This is used when building the binding table.
495 */
496 ShaderID addHitGroup(
497 const std::string& closestHit,
498 const std::string& anyHit = "",
499 const std::string& intersection = "",
500 const TypeConformanceList& typeConformances_ = TypeConformanceList(),
501 const std::string& entryPointNameSuffix = ""
502 )
503 {
504 FALCOR_CHECK(
505 !(closestHit.empty() && anyHit.empty() && intersection.empty()),
506 "At least one of 'closestHit', 'anyHit' or 'intersection' entry point names must not be empty"
507 );
508
509 auto& group = addEntryPointGroup();
510 group.setTypeConformances(typeConformances_);
511 if (!closestHit.empty())
512 group.addEntryPoint(ShaderType::ClosestHit, closestHit, closestHit + entryPointNameSuffix);
513 if (!anyHit.empty())
514 group.addEntryPoint(ShaderType::AnyHit, anyHit, anyHit + entryPointNameSuffix);
515 if (!intersection.empty())
516 group.addEntryPoint(ShaderType::Intersection, intersection, intersection + entryPointNameSuffix);
517
518 return ShaderID{int32_t(entryPointGroups.size() - 1)};
519 }
520
521 /**
522 * Set the max recursion depth.

Callers 7

TracePassMethod · 0.80
setSceneMethod · 0.80
setSceneMethod · 0.80
executeRaytraceMethod · 0.80
executeRaytraceMethod · 0.80
sceneChangedMethod · 0.80
loadSceneMethod · 0.80

Calls 4

TypeConformanceListClass · 0.85
setTypeConformancesMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by 1

sceneChangedMethod · 0.64