This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Transforms the 4 color bytes to a single float. | |
/// The resulting float might not be a valid float number; but only the bytes | |
/// are important for usage later on the graphics card | |
/// </summary> | |
/// <param name="color">Any color</param> | |
/// <returns>The four color bytes as one float</returns> | |
Single ConvertColorToSingle(Color color) | |
{ | |
byte[] bytes = BitConverter.GetBytes(((Color)color).PackedValue); |
NewerOlder