Create a stateset for every particle system to create its own defineMap

revert-6246b479
Andrei Kortunov 11 months ago
parent 6adcd122a8
commit a08d921c4c

@ -893,6 +893,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<osgParticle::ParticleSystem*>(&drawable))
needPop = true;
if (needPop)
{
pushRequirements(drawable);

Loading…
Cancel
Save