Jelajahi Sumber

always init matrix

ncannasse 10 tahun lalu
induk
melakukan
bfaddecc96
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      h3d/pass/ColorMatrix.hx

+ 1 - 1
h3d/pass/ColorMatrix.hx

@@ -39,7 +39,7 @@ class ColorMatrix extends ScreenFx<ColorMatrixShader> {
 
 	public function new( ?m : h3d.Matrix ) {
 		super(new ColorMatrixShader());
-		if( m != null ) shader.matrix = m;
+		if( m != null ) shader.matrix = m else shader.matrix.identity();
 		shader.maskPower = 1;
 		shader.maskChannel.set(1, 0, 0, 0); // red channel
 	}