Procházet zdrojové kódy

make gain passes-independant (total gain)

ncannasse před 7 roky
rodič
revize
7cc093c60f
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      h3d/pass/Blur.hx

+ 2 - 1
h3d/pass/Blur.hx

@@ -89,7 +89,8 @@ class Blur extends ScreenFx<h3d.shader.Blur> {
 			tot += g;
 			if( i > 0 ) tot += g;
 		}
-		tot /= gain;
+		if( passes > 0 )
+			tot /= Math.pow(gain,1/passes);
 		for( i in 0...quality + 1 )
 			values[i] /= tot;
 	}