Merge branch 'ripply-doll' into 'master'

Fix inventory doll when non-compute-shader ripples are used with FFP

See merge request OpenMW/openmw!4390
pull/3236/head
Alexei Kotov 3 months ago
commit 56e200f8ac

@ -206,8 +206,14 @@ namespace MWRender
};
// PASS: Blot in all ripple spawners
mProgramBlobber->apply(state);
state.apply(frameState.mStateset);
state.pushStateSet(frameState.mStateset);
state.apply();
state.applyAttribute(mProgramBlobber);
for (const auto& [name, stack] : state.getUniformMap())
{
if (!stack.uniformVec.empty())
state.getLastAppliedProgramObject()->apply(*(stack.uniformVec.back().first));
}
if (mUseCompute)
{
@ -225,8 +231,12 @@ namespace MWRender
}
// PASS: Wave simulation
mProgramSimulation->apply(state);
state.apply(frameState.mStateset);
state.applyAttribute(mProgramSimulation);
for (const auto& [name, stack] : state.getUniformMap())
{
if (!stack.uniformVec.empty())
state.getLastAppliedProgramObject()->apply(*(stack.uniformVec.back().first));
}
if (mUseCompute)
{
@ -242,6 +252,8 @@ namespace MWRender
state.applyTextureAttribute(0, mTextures[1]);
osg::Geometry::drawImplementation(renderInfo);
}
state.popStateSet();
}
osg::Texture* RipplesSurface::getColorTexture() const

@ -239,7 +239,7 @@ namespace Debug
group->push(state);
lastAppliedStack.push_back(group);
}
if (!(lastAppliedStack.back() == this))
if (lastAppliedStack.empty() || !(lastAppliedStack.back() == this))
{
push(state);
lastAppliedStack.push_back(this);

Loading…
Cancel
Save