Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add( "RenderScreenspaceEffects", "blinkeffects", function()
- //if f_started == false then return end
- if LocalPlayer().mblur == nil then LocalPlayer().mblur = false end
- if ( LocalPlayer().mblur == true ) then
- DrawMotionBlur( 0.3, 0.8, 0.03 )
- end
- if LocalPlayer().n420endtime and LocalPlayer().n420endtime > CurTime() then
- DrawMotionBlur( 1 - ( LocalPlayer().n420endtime - CurTime() ) / 15 , 0.3, 0.025 )
- DrawSharpen( ( LocalPlayer().n420endtime - CurTime() ) / 3, ( LocalPlayer().n420endtime - CurTime() ) / 20 )
- clr_r = ( LocalPlayer().n420endtime - CurTime() ) * 2
- clr_g = ( LocalPlayer().n420endtime - CurTime() ) * 2
- clr_b = ( LocalPlayer().n420endtime - CurTime() ) * 2
- end
- local dark = 0
- local contrast = 1
- local colour = 1
- local nvgbrightness = 0
- local clr_r = 0
- local clr_g = 0
- local clr_b = 0
- local bloommul = 1.2
- local add_r = 0
- local add_b = 0
- local add_g = 0
- if IsValid(LocalPlayer():GetActiveWeapon()) then
- if LocalPlayer():GetActiveWeapon():GetClass() == "item_nvg" then
- nvgbrightness = 0.2
- add_g = 0.15
- DrawSobel( 0.7 )
- end
- end
- if LocalPlayer():Health() < 30 and LocalPlayer():Alive() then
- colour = math.Clamp((LocalPlayer():Health() / LocalPlayer():GetMaxHealth()) * 5, 0, 2)
- DrawMotionBlur( 0.27, 0.5, 0.01 )
- DrawSharpen( 1,2 )
- DrawToyTown( 3, ScrH() / 1.8 )
- end
- if LocalPlayer():GTeam() then
- if LocalPlayer():GTeam() == TEAM_SPEC then
- contrast = 1
- nvgbrightness = 0
- elseif LocalPlayer():GTeam() == TEAM_SCP then
- contrast = 1
- nvgbrightness = 0.1
- clr_r = 0
- add_r = 0.1
- else
- dark = 0.05
- end
- end
- if livecolors then
- contrast = 1.1
- colour = 1.5
- bloommul = 2
- end
- render.UpdateScreenEffectTexture()
- mat_color:SetTexture( "$fbtexture", render.GetScreenEffectTexture() )
- mat_color:SetFloat( "$pp_colour_brightness", brightness + nvgbrightness - dark)
- mat_color:SetFloat( "$pp_colour_contrast", contrast)
- mat_color:SetFloat( "$pp_colour_colour", colour )
- mat_color:SetFloat( "$pp_colour_mulr", clr_r )
- mat_color:SetFloat( "$pp_colour_mulg", clr_g )
- mat_color:SetFloat( "$pp_colour_mulb", clr_b )
- mat_color:SetFloat( "$pp_colour_addr", add_r )
- mat_color:SetFloat( "$pp_colour_addg", add_g )
- mat_color:SetFloat( "$pp_colour_addb", add_b )
- render.SetMaterial( mat_color )
- render.DrawScreenQuad()
- //DrawBloom( Darken, Multiply, SizeX, SizeY, Passes, ColorMultiply, Red, Green, Blue )
- DrawBloom( 0.65, bloommul, 9, 9, 1, 1, 1, 1, 1 )
- DrawSharpen( 1.2, 0.3 )
- DrawToyTown( 3, ScrH()/3 )
- end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement