Merge changes from The Witness.

This commit is contained in:
castano
2011-04-06 02:41:15 +00:00
parent 9ebcff93de
commit 8a837981b6
19 changed files with 212 additions and 45 deletions

View File

@ -169,6 +169,17 @@ namespace nv
return color;
}
inline Color32 toColor32(Vector4::Arg v)
{
Color32 color;
color.r = uint8(clamp(v.x, 0.0f, 1.0f) * 255);
color.g = uint8(clamp(v.y, 0.0f, 1.0f) * 255);
color.b = uint8(clamp(v.z, 0.0f, 1.0f) * 255);
color.a = uint8(clamp(v.w, 0.0f, 1.0f) * 255);
return color;
}
inline Vector4 toVector4(Color32 c)
{
const float scale = 1.0f / 255.0f;