mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 22:53:53 +00:00
Merge branch 'particles_fix' into 'master'
Create a stateset for every particle system to create its own defineMap Closes #7304 See merge request OpenMW/openmw!3162 (cherry picked from commit558b3cbf60
)a08d921c
Create a stateset for every particle system to create its own defineMap
This commit is contained in:
parent
6ea1c2b422
commit
95da78ace0
1 changed files with 5 additions and 0 deletions
|
@ -848,6 +848,11 @@ namespace Shader
|
||||||
{
|
{
|
||||||
bool needPop = drawable.getStateSet() || mRequirements.empty();
|
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)
|
if (needPop)
|
||||||
{
|
{
|
||||||
pushRequirements(drawable);
|
pushRequirements(drawable);
|
||||||
|
|
Loading…
Reference in a new issue