Blur behind buttons/sprites should now be working as intended.
This commit is contained in:
@@ -281,20 +281,31 @@ void DrawFinalPass::Draw(RenderScene& scene, BlurHUD* blurHUDPass)
|
||||
GLERROR("Shielded Transparent objects");
|
||||
|
||||
//Generate blur texture.
|
||||
m_FullBlurredTexture = blurHUDPass->Draw(m_SceneTexture, scene);
|
||||
//Combine nonblur and blur texture
|
||||
delete state;
|
||||
if (scene.ShouldBlur) {
|
||||
//This needs to be drawn only when the full scene is being renderd, and then let be, otherwise sprite and other shit will show on it.
|
||||
m_FullBlurredTexture = blurHUDPass->Draw(m_SceneTexture, scene);
|
||||
}
|
||||
|
||||
DrawFinalPassState* stateSprite = new DrawFinalPassState(m_FinalPassFrameBuffer.GetHandle());
|
||||
if(scene.ShouldBlur) {
|
||||
//Combine nonblur and blur texture
|
||||
stateSprite->Disable(GL_DEPTH_TEST);
|
||||
stateSprite->Disable(GL_STENCIL_TEST);
|
||||
m_CombinedTexture = blurHUDPass->CombineTextures(m_SceneTexture, m_FullBlurredTexture);
|
||||
|
||||
}
|
||||
//Draw Transparen objects
|
||||
//state->BlendFunc(GL_ONE, GL_ONE);
|
||||
//state->StencilFunc(GL_EQUAL, 1, 0xFF);
|
||||
//DrawModelRenderQueues(scene.Jobs.TransparentObjects, scene);
|
||||
GLERROR("TransparentObjects");
|
||||
//state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
stateSprite->Enable(GL_DEPTH_TEST);
|
||||
DrawSprites(scene.Jobs.SpriteJob, scene);
|
||||
|
||||
GLERROR("SpriteJobs");
|
||||
|
||||
delete state;
|
||||
delete stateSprite;
|
||||
GLERROR("END");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user