Browse Source

another minor FixedColor change

Nicolas Cannasse 6 years ago
parent
commit
920738fe54
1 changed files with 4 additions and 2 deletions
  1. 4 2
      h3d/shader/FixedColor.hx

+ 4 - 2
h3d/shader/FixedColor.hx

@@ -7,8 +7,10 @@ class FixedColor extends hxsl.Shader {
 		@const @param var USE_ALPHA : Bool;
 		var output : { color : Vec4 };
 		function fragment() {
-			output.color.rgb = color.rgb;
-			if( USE_ALPHA ) output.color.a = color.a;
+			if( USE_ALPHA ) 
+				output.color = color;
+			else
+				output.color.rgb = color.rgb;
 		}
 	}