| 42 | } |
| 43 | |
| 44 | PackedColor GetPackedColor(const ParamEntry& entry) |
| 45 | { |
| 46 | if (entry.GetSize() != 4) |
| 47 | { |
| 48 | return PackedWhite; |
| 49 | } |
| 50 | int r8 = toInt(entry[0].GetFloat() * 255); |
| 51 | int g8 = toInt(entry[1].GetFloat() * 255); |
| 52 | int b8 = toInt(entry[2].GetFloat() * 255); |
| 53 | int a8 = toInt(entry[3].GetFloat() * 255); |
| 54 | saturate(r8, 0, 255); |
| 55 | saturate(g8, 0, 255); |
| 56 | saturate(b8, 0, 255); |
| 57 | saturate(a8, 0, 255); |
| 58 | return PackedColor(r8, g8, b8, a8); |
| 59 | } |
| 60 | |
| 61 | Color GetColor(const ParamEntry& entry) |
| 62 | { |
no test coverage detected