Permalink
Browse files

Don't save PP effects over sessions

Apparently assholish servers are using this maliciously.
  • Loading branch information...
1 parent acb13c5 commit ec0ade54c1f2f76f1698fbe6addf1dd45870b155 @robotboy655 robotboy655 committed Jun 10, 2014
@@ -12,7 +12,7 @@ mat_Downsample:SetTexture( "$fbtexture", render.GetScreenEffectTexture() )
--[[---------------------------------------------------------
Register the convars that will control this effect
-----------------------------------------------------------]]
-local pp_bloom = CreateClientConVar( "pp_bloom", "0", true, false ) -- On/Off
+local pp_bloom = CreateClientConVar( "pp_bloom", "0", false, false ) -- On/Off
local pp_bloom_darken = CreateClientConVar( "pp_bloom_darken", "0.65", true, false ) -- Decides the strength of the bloom
local pp_bloom_multiply = CreateClientConVar( "pp_bloom_multiply", "1.0", true, false ) -- Decides the strength of the bloom
local pp_bloom_sizex = CreateClientConVar( "pp_bloom_sizex", "4.0", true, false ) -- Horizontal blur size
@@ -1,10 +1,10 @@
local blur_mat = Material( "pp/bokehblur" )
+local pp_bokeh = CreateClientConVar( "pp_bokeh", "0", false, false )
local pp_bokeh_blur = CreateClientConVar( "pp_bokeh_blur", "5", true, false )
local pp_bokeh_distance = CreateClientConVar( "pp_bokeh_distance", "0.1", true, false )
local pp_bokeh_focus = CreateClientConVar( "pp_bokeh_focus", "1.0", true, false )
-local pp_bokeh = CreateClientConVar( "pp_bokeh", "0", true, false )
local function DrawBokehDOF()
@@ -6,7 +6,7 @@ mat_ColorMod:SetTexture( "$fbtexture", render.GetScreenEffectTexture() )
--[[---------------------------------------------------------
Register the convars that will control this effect
-----------------------------------------------------------]]
-local pp_colormod = CreateClientConVar( "pp_colormod", "0", true, false )
+local pp_colormod = CreateClientConVar( "pp_colormod", "0", false, false )
local pp_colormod_addr = CreateClientConVar( "pp_colormod_addr", "0", true, false )
local pp_colormod_addg = CreateClientConVar( "pp_colormod_addg", "0", true, false )
local pp_colormod_addb = CreateClientConVar( "pp_colormod_addb", "0", true, false )
@@ -1,5 +1,5 @@
-CreateClientConVar( "pp_dof", "0", true, false )
+CreateClientConVar( "pp_dof", "0", false, false )
local pp_dof_initlength = CreateClientConVar( "pp_dof_initlength", "256", true, false )
local pp_dof_spacing = CreateClientConVar( "pp_dof_spacing", "512", true, false )
@@ -1,4 +1,22 @@
+--
+-- The number of frames to blend
+--
+local pp_fb = CreateClientConVar( "pp_fb", "0", false, false )
+
+--
+-- The number of frames to blend
+--
+local pp_fb_frames = CreateClientConVar( "pp_fb_frames", "16", true, false )
+
+--
+-- The amount of time the shutter is open. If this is 0.5 then we will blend only
+-- 50% of the frames. This is normally 0.5. Lowering it will make it more blurry.
+--
+local pp_fb_shutter = CreateClientConVar( "pp_fb_shutter", "0.5", true, false )
+
+
+
local FrameCurves = {}
local function FixupCurve( num )
@@ -43,26 +61,6 @@ local function FrameCurve( f, num )
end
---
--- The number of frames to blend
---
-local pp_fb = CreateClientConVar( "pp_fb", "0", true, false )
-
---
--- The number of frames to blend
---
-local pp_fb_frames = CreateClientConVar( "pp_fb_frames", "16", true, false )
-
---
--- The amount of time the shutter is open. If this is 0.5 then we will blend only
--- 50% of the frames. This is normally 0.5. Lowering it will make it more blurry.
---
-local pp_fb_shutter = CreateClientConVar( "pp_fb_shutter", "0.5", true, false )
-
--- 8 low
--- 16 avg
--- 32 vhigh
-
local texFSB = render.GetSuperFPTex()
local matFSB = Material( "pp/motionblur" )
local matFB = Material( "pp/fb" )
@@ -6,7 +6,7 @@ local tex_MotionBlur = render.GetMoBlurTex0()
--[[---------------------------------------------------------
Register the convars that will control this effect
-----------------------------------------------------------]]
-local pp_motionblur = CreateClientConVar( "pp_motionblur", "0", true, false )
+local pp_motionblur = CreateClientConVar( "pp_motionblur", "0", false, false )
local pp_motionblur_addalpha = CreateClientConVar( "pp_motionblur_addalpha", "0.2", true, false )
local pp_motionblur_drawalpha = CreateClientConVar( "pp_motionblur_drawalpha", "0.99", true, false )
local pp_motionblur_delay = CreateClientConVar( "pp_motionblur_delay", "0.05", true, false )
@@ -2,7 +2,7 @@
--[[---------------------------------------------------------
Register the convars that will control this effect
-----------------------------------------------------------]]
-local pp_mat_overlay = CreateClientConVar( "pp_mat_overlay", "", true, false )
+local pp_mat_overlay = CreateClientConVar( "pp_mat_overlay", "", false, false )
local pp_mat_overlay_refractamount = CreateClientConVar( "pp_mat_overlay_refractamount", "0.3", true, false )
local lastTexture = nil
@@ -5,9 +5,9 @@ _Material:SetTexture( "$fbtexture", render.GetScreenEffectTexture() )
--[[---------------------------------------------------------
Register the convars that will control this effect
-----------------------------------------------------------]]
+local pp_sharpen = CreateClientConVar( "pp_sharpen", "0", false, false )
local pp_sharpen_contrast = CreateClientConVar( "pp_sharpen_contrast", "1", true, false )
local pp_sharpen_distance = CreateClientConVar( "pp_sharpen_distance", "1", true, false )
-local pp_sharpen = CreateClientConVar( "pp_sharpen", "0", true, false )
function DrawSharpen( contrast, distance )
@@ -3,8 +3,8 @@ local SobelMaterial = Material( "pp/sobel" )
SobelMaterial:SetTexture( "$fbtexture", render.GetScreenEffectTexture() )
-- convars
+local pp_sobel = CreateClientConVar( "pp_sobel", "0", false, false )
local pp_sobel_threshold = CreateClientConVar( "pp_sobel_threshold", "0.11", true, false )
-local pp_sobel = CreateClientConVar( "pp_sobel", "0", true, false )
--[[------------------------------------
DrawSobel()
@@ -2,7 +2,7 @@
--[[---------------------------------------------------------
Register the convars that will control this effect
-----------------------------------------------------------]]
-local pp_stereoscopy = CreateClientConVar( "pp_stereoscopy", "0", true, false ) -- On/Off
+local pp_stereoscopy = CreateClientConVar( "pp_stereoscopy", "0", false, false )
local pp_stereoscopy_size = CreateClientConVar( "pp_stereoscopy_size", "6", true, false )
@@ -5,7 +5,7 @@ _Material:SetTexture( "$fbtexture", render.GetScreenEffectTexture() )
--[[---------------------------------------------------------
Register the convars that will control this effect
-----------------------------------------------------------]]
-local pp_sunbeams = CreateClientConVar( "pp_sunbeams", "0", true, false )
+local pp_sunbeams = CreateClientConVar( "pp_sunbeams", "0", false, false )
local pp_sunbeams_darken = CreateClientConVar( "pp_sunbeams_darken", "0.95", true, false )
local pp_sunbeams_multiply = CreateClientConVar( "pp_sunbeams_multiply", "1.0", true, false )
local pp_sunbeams_sunsize = CreateClientConVar( "pp_sunbeams_sunsize", "0.075", true, false )
@@ -3,7 +3,7 @@ local matMaterial = Material( "pp/texturize" )
matMaterial:SetTexture( "$fbtexture", render.GetScreenEffectTexture() )
-local pp_texturize = CreateClientConVar( "pp_texturize", "", true, false )
+local pp_texturize = CreateClientConVar( "pp_texturize", "", false, false )
local pp_texturize_scale = CreateClientConVar( "pp_texturize_scale", "1", true, false )
function DrawTexturize( scale, pMaterial )
@@ -5,7 +5,7 @@ _Material:SetTexture( "$fbtexture", render.GetScreenEffectTexture() )
--[[---------------------------------------------------------
Register the convars that will control this effect
-----------------------------------------------------------]]
-local pp_toytown = CreateClientConVar( "pp_toytown", "0", true, false )
+local pp_toytown = CreateClientConVar( "pp_toytown", "0", false, false )
local pp_toytown_passes = CreateClientConVar( "pp_toytown_passes", "3", true, false )
local pp_toytown_size = CreateClientConVar( "pp_toytown_size", "0.4", true, false )

0 comments on commit ec0ade5

Please sign in to comment.