|
@@ -14,4 +14,15 @@ public static class ColorEx
|
|
|
ptr[3] = (Half)(normalizedAlpha);
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ public static unsafe ulong ToULong(this ColorF colorF)
|
|
|
+ {
|
|
|
+ ulong result = 0;
|
|
|
+ Half* ptr = (Half*)&result;
|
|
|
+ ptr[0] = (Half)colorF.R;
|
|
|
+ ptr[1] = (Half)colorF.G;
|
|
|
+ ptr[2] = (Half)colorF.B;
|
|
|
+ ptr[3] = (Half)colorF.A;
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|