| 176 | } |
| 177 | |
| 178 | void RenderGraph::updatePass(const std::string& passName, const Properties& props) |
| 179 | { |
| 180 | uint32_t index = getPassIndex(passName); |
| 181 | const auto pPassIt = mNodeData.find(index); |
| 182 | |
| 183 | FALCOR_CHECK(pPassIt != mNodeData.end(), "Can't update render pass '{}'. Pass doesn't exist.", passName); |
| 184 | |
| 185 | // Recreate pass without changing graph using new dictionary |
| 186 | auto pOldPass = pPassIt->second.pPass; |
| 187 | std::string passTypeName = pOldPass->getType(); |
| 188 | auto pPass = RenderPass::create(passTypeName, mpDevice, props); |
| 189 | pPassIt->second.pPass = pPass; |
| 190 | pPass->mPassChangedCB = [this]() { mRecompile = true; }; |
| 191 | pPass->mName = pOldPass->getName(); |
| 192 | |
| 193 | if (mpScene) |
| 194 | pPass->setScene(mpDevice->getRenderContext(), mpScene); |
| 195 | mRecompile = true; |
| 196 | } |
| 197 | |
| 198 | const ref<RenderPass>& RenderGraph::getPass(const std::string& name) const |
| 199 | { |
no test coverage detected