diff --git a/components/shader/shadervisitor.cpp b/components/shader/shadervisitor.cpp index 18ba0e6569..b03c453ff9 100644 --- a/components/shader/shadervisitor.cpp +++ b/components/shader/shadervisitor.cpp @@ -848,6 +848,11 @@ namespace Shader { bool needPop = drawable.getStateSet() || mRequirements.empty(); + // We need to push and pop a requirements object because particle systems can have + // different shader requirements to other drawables, so might need a different shader variant. + if (!needPop && dynamic_cast(&drawable)) + needPop = true; + if (needPop) { pushRequirements(drawable);