2
0
Эх сурвалжийг харах

ColorSpaces : Added int2rgba

TothBenoit 7 сар өмнө
parent
commit
1bf73f32ae

+ 4 - 0
h3d/shader/ColorSpaces.hx

@@ -43,5 +43,9 @@ class ColorSpaces extends hxsl.Shader {
 			var r = ycocg.g + b;
 			return vec3(r, g, b);
 		}
+
+		function int2rgba( c : Int ) : Vec4 {
+			return vec4((c >> 16) & 0xFF, (c >> 8) & 0xFF, c & 0xFF, (c >> 24) & 0xFF) * (1.0 / float(0xFF));
+		}
     }
 }