• Working with blurscreen
    4 replies, posted
Hi All, New to blur, and materials in general. Not sure what I've done wrong. What I'm getting is in the picture below ( any pointers would be great ): [CODE] SB.VGUI.HeaderContainer.Paint = function() local blurTex = Material( "pp/blurscreen" ) surface.SetMaterial( blurTex ) surface.SetDrawColor( 255, 255, 255, 255 ) blurTex:SetFloat( "$blur", 3 ) render.UpdateScreenEffectTexture() surface.SetMaterial(blurTex) surface.DrawTexturedRect( 0, 0, SB.VGUI.HeaderContainer:GetWide(), SB.VGUI.HeaderContainer:GetTall() ) end [/CODE] [IMG]http://i.imgur.com/XoLuUc1.png[/IMG]
I think you have to set the float up gradually or something like that ([URL="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/derma/derma_utils.lua#L30-L35"]since that's what gmod seems to do[/URL]) Also, you probably shouldn't be creating an IMaterial in a paint function
[QUOTE=MPan1;50231296]I think you have to set the float up gradually or something like that ([URL="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/derma/derma_utils.lua#L30-L35"]since that's what gmod seems to do[/URL]) Also, you probably shouldn't be creating an IMaterial in a paint function[/QUOTE] Sorry, it was outside the paint function, I just put it there to test something :P And oh, I can try setting it gradually.
What exactly do you want to achive?
[QUOTE=whitestar;50231415]What exactly do you want to achive?[/QUOTE] I've got it now thanks Whitestar - Neth helped out. I was just wondering why my blur was appearing as above, which I now have fixed. Thanks.
Sorry, you need to Log In to post a reply to this thread.