소스 검색

make gain passes-independant (total gain)

ncannasse 7 년 전
부모
커밋
7cc093c60f
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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;
 	}