Browse Source

make gain passes-independant (total gain)

ncannasse 7 năm trước cách đây
mục cha
commit
7cc093c60f
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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;
 	}