I am working on a hud, and I would like some input on how I could go about doing something...
This is the hud so far, [IMG]http://images.akamai.steamusercontent.com/ugc/96099157750051791/7F59AFD3F9B02B9561A4FAEB82B08216A46EF18A/[/IMG]
I want to add a thin black border around the blurred areas, and I want to make the blurred areas well, more blurry.
I am using a blurr func I found online [CODE]local function DrawBlurRect(x, y, w, h, amount, heavyness)
surface.SetDrawColor(255, 255, 255, 255)
surface.SetMaterial(blur)
for i = 1, heavyness do
blur:SetFloat("$blur", (i / 3) * (amount or 6))
blur:Recompute()
render.UpdateScreenEffectTexture()
render.SetScissorRect(x, y, x + w, y + h, true)
surface.DrawTexturedRect(0 * -1, 0 * -1, ScrW(), ScrH())
render.SetScissorRect(0, 0, 0, 0, false)
end
end[/CODE]
and this is what I have to draw the boxes. I simply make the area darker by adding a black transparent box over the drawBlurRect().
[CODE]DrawBlurRect( x, y, 440, 290, 5, 2 )
draw.RoundedBox( 5, x-10, y, 450, 300, Color( 0, 0, 0, 175 ) )[/CODE]
[CODE]DrawBlurRect( abx, aby, 260, 100, 5, 2 )
draw.RoundedBox( 20, abx, aby, 260, 100, Color( 0, 0, 0, 175 ) )[/CODE]
No, adding multiple DrawBlurRect() on top of eachother do not make it more blurry. I would assume the heaviness, in the local function DrawBlurRect(x, y, w, h, amount, heavyness) would be it, but I have played around with it and it is not.
Any help is appreciated.
Wow, made a very simple error.. I mixed up the amount and heaviness. I am still wondering about making a black outline, though.
Sorry, you need to Log In to post a reply to this thread.