]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Oops! Forgot the underwater blur code. Blur postprocessing will properly work now.
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Feb 2011 01:57:02 +0000 (03:57 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Feb 2011 01:57:02 +0000 (03:57 +0200)
data/defaultVoretournament.cfg
data/qcsrc/client/View.qc

index 4143405054726ccfa0548b58809c782560bdcf63..866a6cbc2ee504e4d30dcaccf674f348b0354636 100644 (file)
@@ -1094,6 +1094,8 @@ seta hud_postprocessing_maxbluralpha 0.5 "maximum alpha which the blur postproce
 seta hud_postprocessing_maxblurradius 10 "maximum radius which the blur postprocess can be"\r
 \r
 seta hud_contents 1 "an improved version of gl_polyblend for liquids such as water/lava/slime, draw a filler when inside the liquid"\r
+seta hud_contents_blur 10 "Use postprocessing to blur the screen when you are inside a liquid. Higher values = more blur"\r
+seta hud_contents_blur_alpha 0.5 "Amount of alpha to use when merging the blurred layers back into the render. Turning this up higher will remove bloom, so it's best to find a balance"\r
 seta hud_contents_factor 1 "factor at which to multiply the current faded value."\r
 seta hud_contents_fadeintime 0.02 "factor of time it takes for the alpha level to reach normal value when entering the liquid"\r
 seta hud_contents_fadeouttime 0.1 "factor of time it takes for the alpha level to reach normal value when leaving the liquid"\r
index 73a9f4da8d10a52848c3f8d93bd83d1ab35afbf5..b8f17b1c031cc623d9cdef84da0f7d7fa10b7e96 100644 (file)
@@ -512,6 +512,22 @@ void CSQC_UpdateView(float w, float h)
                \r
                if(contentavgalpha)\r
                        drawfill('0 0 0', '1 0 0' * vid_conwidth + '0 1 0' * vid_conheight, liquidcolor_prev, contentavgalpha * liquidalpha_prev, DRAWFLAG_NORMAL);\r
+\r
+               if(cvar("hud_postprocessing"))\r
+               {\r
+                       if(cvar("hud_contents_blur"))\r
+                       {\r
+                               content_blurpostprocess_x = 1;\r
+                               content_blurpostprocess_y = contentavgalpha * cvar("hud_contents_blur");\r
+                               content_blurpostprocess_z = contentavgalpha * cvar("hud_contents_blur_alpha");\r
+                       }\r
+                       else\r
+                       {\r
+                               content_blurpostprocess_x = 0;\r
+                               content_blurpostprocess_y = 0;\r
+                               content_blurpostprocess_z = 0;\r
+                       }\r
+               }\r
        }\r
 \r
        if(cvar("hud_damage"))\r