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

Method addPass

Source/Falcor/RenderGraph/RenderGraph.cpp:134–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134uint32_t RenderGraph::addPass(const ref<RenderPass>& pPass, const std::string& passName)
135{
136 FALCOR_CHECK(pPass != nullptr, "Added pass must not be null.");
137 FALCOR_CHECK(getPassIndex(passName) == kInvalidIndex, "Pass name '{}' already exists.", passName);
138
139 uint32_t passIndex = mpGraph->addNode();
140 mNameToIndex[passName] = passIndex;
141
142 pPass->mPassChangedCB = [this]() { mRecompile = true; };
143 pPass->mName = passName;
144
145 if (mpScene)
146 pPass->setScene(mpDevice->getRenderContext(), mpScene);
147 mNodeData[passIndex] = {passName, pPass};
148 mRecompile = true;
149 return passIndex;
150}
151
152void RenderGraph::removePass(const std::string& name)
153{

Calls 2

addNodeMethod · 0.45
setSceneMethod · 0.45

Tested by 6

test_SideBySideFunction · 0.76
test_SplitScreenFunction · 0.76
test_ColorMapPassFunction · 0.76
test_FLIPPassFunction · 0.76
GPU_TESTFunction · 0.64