• Add a blur behind draw.RoundedBox
    9 replies, posted
Hello is there anyway to add a blur behind this? draw.RoundedBox(6, ScrW()*(10/1920), ScrW()*(995/1920), ScrW()*(450/1920), ScrW()*(70/1920), Color(46, 46, 52, 255))
local blur = Material("pp/blurscreen") local function DrawBlur(panel, amount) local x, y = panel:LocalToScreen(0, 0) local scrW, scrH = ScrW(), ScrH() surface.SetDrawColor(255, 255, 255) surface.SetMaterial(blur) for i = 1, 3 do blur:SetFloat("$blur", (i / 3) * (amount or 6)) blur:Recompute() render.UpdateScreenEffectTexture() surface.DrawTexturedRect(x * -1, y * -1, scrW, scrH) end end Try something like that.
It will still bluring corners
This didnt seem to work     local blur = Material("pp/blurscreen")     local function DrawBlur(panel, amount)         local x, y = panel:LocalToScreen(0, 0)         local scrW, scrH = ScrW(), ScrH()         surface.SetDrawColor(255, 255, 255)         surface.SetMaterial(blur)         for i = 1, 3 do             blur:SetFloat("$blur", (i / 3) * (amount or 6))             blur:Recompute()             render.UpdateScreenEffectTexture()             surface.DrawTexturedRect(6, ScrW()*(10/1920), ScrW()*(900/1920), ScrW()*(450/1920), ScrW()*(100/1920))         end     end
What did you try, you only shown us the code to draw a blur, but you are not applying it nowhere
I dont know how to apply it I want it to blur this draw.RoundedBox(6, ScrW()*(10/1920), ScrW()*(995/1920), ScrW()*(450/1920), ScrW()*(70/1920), Color(46, 46, 52, 255))
please help
Call the function before drawing the box. That will layer it in the background.
how do i call what function
*sigh* Learn lua. https://www.youtube.com/watch?v=c1mQ3mpdiJU&list=PLyQg3m0a5UivaAXEfVDngKYp9jyNSTIo_&index=1
Sorry, you need to Log In to post a reply to this thread.