From 8760d86f8cfc2c7f1234736deaa7aa943937e7c9 Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 27 Oct 2023 16:39:07 -0700 Subject: [PATCH] HnRenderPass: skip invisible RPrims --- Hydrogent/src/HnRenderPass.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Hydrogent/src/HnRenderPass.cpp b/Hydrogent/src/HnRenderPass.cpp index 0aa98b96..ca043690 100644 --- a/Hydrogent/src/HnRenderPass.cpp +++ b/Hydrogent/src/HnRenderPass.cpp @@ -128,6 +128,9 @@ void HnRenderPass::_Execute(const pxr::HdRenderPassStateSharedPtr& RPState, if (pRPrim == nullptr) continue; + if (!pRPrim->IsVisible()) + continue; + const auto& MaterialId = pRPrim->GetMaterialId(); const pxr::HdSprim* pMaterial = pRenderIndex->GetSprim(pxr::HdPrimTypeTokens->material, MaterialId); if (pMaterial == nullptr)