Advertisement
Guest User

Untitled

a guest
May 26th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. hook.Add( "RenderScreenspaceEffects", "blinkeffects", function()
  2. //if f_started == false then return end
  3.  
  4. if LocalPlayer().mblur == nil then LocalPlayer().mblur = false end
  5. if ( LocalPlayer().mblur == true ) then
  6. DrawMotionBlur( 0.3, 0.8, 0.03 )
  7. end
  8.  
  9. if LocalPlayer().n420endtime and LocalPlayer().n420endtime > CurTime() then
  10. DrawMotionBlur( 1 - ( LocalPlayer().n420endtime - CurTime() ) / 15 , 0.3, 0.025 )
  11. DrawSharpen( ( LocalPlayer().n420endtime - CurTime() ) / 3, ( LocalPlayer().n420endtime - CurTime() ) / 20 )
  12. clr_r = ( LocalPlayer().n420endtime - CurTime() ) * 2
  13. clr_g = ( LocalPlayer().n420endtime - CurTime() ) * 2
  14. clr_b = ( LocalPlayer().n420endtime - CurTime() ) * 2
  15. end
  16. local dark = 0
  17. local contrast = 1
  18. local colour = 1
  19. local nvgbrightness = 0
  20. local clr_r = 0
  21. local clr_g = 0
  22. local clr_b = 0
  23. local bloommul = 1.2
  24. local add_r = 0
  25. local add_b = 0
  26. local add_g = 0
  27.  
  28. if IsValid(LocalPlayer():GetActiveWeapon()) then
  29. if LocalPlayer():GetActiveWeapon():GetClass() == "item_nvg" then
  30. nvgbrightness = 0.2
  31. add_g = 0.15
  32. DrawSobel( 0.7 )
  33. end
  34. end
  35. if LocalPlayer():Health() < 30 and LocalPlayer():Alive() then
  36. colour = math.Clamp((LocalPlayer():Health() / LocalPlayer():GetMaxHealth()) * 5, 0, 2)
  37. DrawMotionBlur( 0.27, 0.5, 0.01 )
  38. DrawSharpen( 1,2 )
  39. DrawToyTown( 3, ScrH() / 1.8 )
  40. end
  41. if LocalPlayer():GTeam() then
  42. if LocalPlayer():GTeam() == TEAM_SPEC then
  43. contrast = 1
  44. nvgbrightness = 0
  45. elseif LocalPlayer():GTeam() == TEAM_SCP then
  46. contrast = 1
  47. nvgbrightness = 0.1
  48. clr_r = 0
  49. add_r = 0.1
  50. else
  51. dark = 0.05
  52. end
  53. end
  54.  
  55. if livecolors then
  56. contrast = 1.1
  57. colour = 1.5
  58. bloommul = 2
  59. end
  60.  
  61. render.UpdateScreenEffectTexture()
  62.  
  63.  
  64. mat_color:SetTexture( "$fbtexture", render.GetScreenEffectTexture() )
  65.  
  66. mat_color:SetFloat( "$pp_colour_brightness", brightness + nvgbrightness - dark)
  67. mat_color:SetFloat( "$pp_colour_contrast", contrast)
  68. mat_color:SetFloat( "$pp_colour_colour", colour )
  69. mat_color:SetFloat( "$pp_colour_mulr", clr_r )
  70. mat_color:SetFloat( "$pp_colour_mulg", clr_g )
  71. mat_color:SetFloat( "$pp_colour_mulb", clr_b )
  72. mat_color:SetFloat( "$pp_colour_addr", add_r )
  73. mat_color:SetFloat( "$pp_colour_addg", add_g )
  74. mat_color:SetFloat( "$pp_colour_addb", add_b )
  75.  
  76.  
  77.  
  78. render.SetMaterial( mat_color )
  79. render.DrawScreenQuad()
  80. //DrawBloom( Darken, Multiply, SizeX, SizeY, Passes, ColorMultiply, Red, Green, Blue )
  81. DrawBloom( 0.65, bloommul, 9, 9, 1, 1, 1, 1, 1 )
  82. DrawSharpen( 1.2, 0.3 )
  83. DrawToyTown( 3, ScrH()/3 )
  84.  
  85. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement