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

Method setAccelerationStructure

Source/Falcor/Core/API/ParameterBlock.cpp:674–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672}
673
674void ParameterBlock::setAccelerationStructure(const BindLocation& bindLocation, const ref<RtAccelerationStructure>& pAccl)
675{
676 if (isAccelerationStructureType(bindLocation.getType()))
677 {
678 gfx::ShaderOffset gfxOffset = getGFXShaderOffset(bindLocation);
679 mAccelerationStructures[gfxOffset] = pAccl;
680 FALCOR_GFX_CALL(mpShaderObject->setResource(gfxOffset, pAccl ? pAccl->getGfxAccelerationStructure() : nullptr));
681 }
682 else
683 {
684 FALCOR_THROW("Error trying to bind an acceleration structure to a non acceleration structure variable.");
685 }
686}
687
688ref<RtAccelerationStructure> ParameterBlock::getAccelerationStructure(const BindLocation& bindLocation) const
689{

Callers

nothing calls this directly

Calls 3

getGFXShaderOffsetFunction · 0.85
getTypeMethod · 0.45

Tested by

no test coverage detected