Forráskód Böngészése

Fix for rendering particles to the glow buffer

LukasPJ 10 éve
szülő
commit
c5dd7230ad

+ 4 - 0
Engine/source/renderInstance/renderGlowMgr.cpp

@@ -202,6 +202,10 @@ void RenderGlowMgr::render( SceneRenderState *state )
          }
 
          ParticleRenderInst *ri = static_cast<ParticleRenderInst*>(_ri);
+
+         GFX->setStateBlock(mParticleRenderMgr->_getHighResStateBlock(ri));
+         mParticleRenderMgr->_getShaderConsts().mShaderConsts->setSafe(mParticleRenderMgr->_getShaderConsts().mModelViewProjSC, *ri->modelViewProj);
+
          mParticleRenderMgr->renderParticle(ri, state);
          j++;
          continue;

+ 3 - 1
Engine/source/renderInstance/renderParticleMgr.h

@@ -137,11 +137,13 @@ protected:
    GFXStateBlockRef mOffscreenBlocks[ParticleRenderInst::BlendStyle_COUNT];
    GFXStateBlockRef mBackbufferBlocks[ParticleRenderInst::BlendStyle_COUNT];
    GFXStateBlockRef mMixedResBlocks[ParticleRenderInst::BlendStyle_COUNT];
-   
+
+public:
    GFXStateBlockRef _getHighResStateBlock(ParticleRenderInst *ri);
    GFXStateBlockRef _getMixedResStateBlock(ParticleRenderInst *ri);
    GFXStateBlockRef _getOffscreenStateBlock(ParticleRenderInst *ri);
    GFXStateBlockRef _getCompositeStateBlock(ParticleRenderInst *ri);
+   ShaderConsts &_getShaderConsts() { return mParticleShaderConsts; };
 };