]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add the water blur code too
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Feb 2011 02:01:41 +0000 (04:01 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Feb 2011 02:01:41 +0000 (04:01 +0200)
defaultXonotic.cfg
qcsrc/client/View.qc
qcsrc/client/autocvars.qh

index 3ff6fe2b7c31221bf9236656cfdb7b8d5f0d6a0a..93754e19552d46a94144eca1758e42549d0070a8 100644 (file)
@@ -1454,6 +1454,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"
 
 seta hud_contents 1 "an improved version of gl_polyblend for liquids such as water/lava/slime, draw a filler when inside the liquid"
+seta hud_contents_blur 10 "Use postprocessing to blur the screen when you are inside a liquid. Higher values = more blur"
+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"
 seta hud_contents_factor 1 "factor at which to multiply the current faded value."
 seta hud_contents_fadeintime 0.02 "factor of time it takes for the alpha level to reach normal value when entering the liquid"
 seta hud_contents_fadeouttime 0.1 "factor of time it takes for the alpha level to reach normal value when leaving the liquid"
index de8be6af898a08c97f765293ae01ebfd9b75ae62..4886c571ebd5f4a57837301f681f24408572c8a4 100644 (file)
@@ -726,6 +726,22 @@ void CSQC_UpdateView(float w, float h)
                
                if(contentavgalpha)
                        drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, liquidcolor_prev, contentavgalpha * liquidalpha_prev, DRAWFLAG_NORMAL);
+
+               if(autocvar_hud_postprocessing)
+               {
+                       if(autocvar_hud_contents_blur)
+                       {
+                               content_blurpostprocess_x = 1;
+                               content_blurpostprocess_y = contentavgalpha * autocvar_hud_contents_blur;
+                               content_blurpostprocess_z = contentavgalpha * autocvar_hud_contents_blur_alpha;
+                       }
+                       else
+                       {
+                               content_blurpostprocess_x = 0;
+                               content_blurpostprocess_y = 0;
+                               content_blurpostprocess_z = 0;
+                       }
+               }
        }
        
        if(autocvar_hud_damage)
index cb28f21868ebc47e60d1a88b86391d219eff4711..008b1c59e4018e2a8f7c021dd81dd4db64fca059 100644 (file)
@@ -149,6 +149,8 @@ float autocvar_hud_configure_grid_xsize;
 float autocvar_hud_configure_grid_ysize;
 float autocvar_hud_configure_teamcolorforced;
 float autocvar_hud_contents;
+float autocvar_hud_contents_blur;
+float autocvar_hud_contents_blur_alpha;
 float autocvar_hud_contents_factor;
 float autocvar_hud_contents_fadeintime;
 float autocvar_hud_contents_fadeouttime;