Forráskód Böngészése

ColorSpaces : Added int2rgba

TothBenoit 7 hónapja
szülő
commit
1bf73f32ae
1 módosított fájl, 4 hozzáadás és 0 törlés
  1. 4 0
      h3d/shader/ColorSpaces.hx

+ 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));
+		}
     }
 }