1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-21 00:39:58 +00:00

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

This commit is contained in:
Andrei Kortunov 2023-06-19 09:54:09 +04:00
parent 6adcd122a8
commit a08d921c4c

View File

@ -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);