method to make sure we're not getting pixel shader inputs mixed with outputs.

This commit is contained in:
Azaezel 2017-07-09 15:15:30 -05:00
parent 412c0380f4
commit 181f95510a
4 changed files with 12 additions and 5 deletions

View file

@ -1159,10 +1159,9 @@ void VolumetricFog::render(ObjectRenderInst *ri, SceneRenderState *state, BaseMa
GFX->drawPrimitive(0);
// Ensure these two textures are bound to the pixel shader input on the second run as they are used as pixel shader outputs (render targets).
GFX->setTexture(1, NULL); //mDepthBuffer
GFX->setTexture(2, NULL); //mFrontBuffer
GFX->updateStates(); //update the dirty texture state we set above
// Ensure these two textures are NOT bound to the pixel shader input on the second run as they are used as pixel shader outputs (render targets).
GFX->clearTextureStateImmediate(1); //mDepthBuffer
GFX->clearTextureStateImmediate(2); //mFrontBuffer
}
void VolumetricFog::reflect_render(ObjectRenderInst *ri, SceneRenderState *state, BaseMatInstance *overrideMat)