Ver Fonte

Bugfix in h3d.pass.Blur (#382)

TheTrueCaligari há 7 anos atrás
pai
commit
98d01cc378
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      h3d/pass/Blur.hx

+ 2 - 1
h3d/pass/Blur.hx

@@ -100,6 +100,7 @@ class Blur extends ScreenFx<h3d.shader.Blur> {
 		if( (quality <= 0 || passes <= 0 || sigma <= 0) && shader.fixedColor == null ) return;
 		if( (quality <= 0 || passes <= 0 || sigma <= 0) && shader.fixedColor == null ) return;
 
 
 		if( output == null ) output = src;
 		if( output == null ) output = src;
+		else h3d.pass.Copy.run(src, output);
 
 
 		var alloc = tmp == null;
 		var alloc = tmp == null;
 		if( alloc )
 		if( alloc )
@@ -119,7 +120,7 @@ class Blur extends ScreenFx<h3d.shader.Blur> {
 		output.depthBuffer = null;
 		output.depthBuffer = null;
 		tmp.depthBuffer = null;
 		tmp.depthBuffer = null;
 		for( i in 0...passes ) {
 		for( i in 0...passes ) {
-			shader.texture = src;
+			shader.texture = output;
 			shader.pixel.set(1 / src.width, 0);
 			shader.pixel.set(1 / src.width, 0);
 			engine.pushTarget(tmp);
 			engine.pushTarget(tmp);
 			render();
 			render();