mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 13:09:42 +00:00
Fix inventory doll when ripple fragment shader path is used
Basically don't abuse OSG as badly. We need to let it know we've bound a shader program so it doesn't assume the FFP is still used, but it doesn't have a built-in way to apply the uniforms when doing so, so we need to do it manually.
This commit is contained in:
parent
95a1183ad3
commit
bd8386459a
1 changed files with 14 additions and 2 deletions
|
@ -206,8 +206,14 @@ namespace MWRender
|
|||
};
|
||||
|
||||
// PASS: Blot in all ripple spawners
|
||||
state.pushStateSet(frameState.mStateset);
|
||||
state.apply();
|
||||
state.applyAttribute(mProgramBlobber);
|
||||
state.apply(frameState.mStateset);
|
||||
for (const auto& [name, stack] : state.getUniformMap())
|
||||
{
|
||||
if (!stack.uniformVec.empty())
|
||||
state.getLastAppliedProgramObject()->apply(*(stack.uniformVec.back().first));
|
||||
}
|
||||
|
||||
if (mUseCompute)
|
||||
{
|
||||
|
@ -226,7 +232,11 @@ namespace MWRender
|
|||
|
||||
// PASS: Wave simulation
|
||||
state.applyAttribute(mProgramSimulation);
|
||||
state.apply(frameState.mStateset);
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue