From fcfd340c697afdaee2fd989e7d782283c929eade Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Thu, 12 Nov 2020 23:23:40 +0000 Subject: [PATCH] Actually copy alpha blended drawables to the new stategraph --- components/sceneutil/shadowsbin.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/components/sceneutil/shadowsbin.cpp b/components/sceneutil/shadowsbin.cpp index 4c0c78cab..520ad0362 100644 --- a/components/sceneutil/shadowsbin.cpp +++ b/components/sceneutil/shadowsbin.cpp @@ -106,7 +106,15 @@ StateGraph* ShadowsBin::cullStateGraph(StateGraph* sg, StateGraph* root, std::un } if (state.mAlphaBlend) - return sg->find_or_insert(mShaderAlphaTestStateSet); + { + sg_new = sg->find_or_insert(mShaderAlphaTestStateSet); + for (RenderLeaf* leaf : sg->_leaves) + { + leaf->_parent = sg_new; + sg_new->_leaves.push_back(leaf); + } + return sg_new; + } return sg; }