blurscreen

I was wondering how to get a blurred screen behind my menus.

I’m not using Derma at the moment so currently I can’t use the Derma_BlurBackground function.

Any ideas?

-snip-

One idea I have is (Probably not a good one) to make an invisible derma panel and use SetBackgroundBlur( true ) on it and make it pop up when your menus show up, and close it when they close.

Is it me or did he just snip a non edited post?

I snipped my own post seconds after I posted it. :stuck_out_tongue:

Oh! I was actually looking for this function, thanks!

Thanks, I should’ve thought of that.

[lua]
local blurTex = Material( “pp/blurscreen” )
surface.SetMaterial( blurTex )
surface.SetDrawColor( 255, 255, 255, 255 )
blurTex:SetMaterialFloat( “$blur”, 3 )
render.UpdateScreenEffectTexture()

surface.SetMaterial(blurTex)
surface.DrawTexturedRect( 0, 0, ScrW(), ScrH() )
[/lua]

Then just draw your menu over it. I think this should work, didn’t fully test it though.

EDIT: Actually never mind. You can just use self:SetBackgroundBlur(true)
EDIT2: Didnt fully read your post so I didnt see you werent using derma. So then my bit of code should work.

Or, you could do it my way and you don’t have to use any of that… :stuck_out_tongue:

But that is a horrible way of doing it.

They’re basically the same exact thing… What I said earlier was after I made a glance at his post, so don’t mind what I said

He’s rights, you are wrong.

Honestly when it comes to using rendering operation for EVERY panel you need to stay efficient.

I ended up using this way. then I added my own little blur in effect to it. Thanks :3

no problem. Glad it worked well for you.