Fix decoding of integer vertex attributes

This commit is contained in:
baldurk
2020-05-21 17:53:37 +01:00
parent b468be50d3
commit e17532c4ed
2 changed files with 40 additions and 5 deletions
+5
View File
@@ -36,6 +36,11 @@ inline Vec4f ConvertFromR10G10B10A2(uint32_t data)
float((data >> 20) & 0x3ff) / 1023.0f, float((data >> 30) & 0x003) / 3.0f);
}
inline Vec4u ConvertFromR10G10B10A2UInt(uint32_t data)
{
return Vec4u((data >> 0) & 0x3ff, (data >> 10) & 0x3ff, (data >> 20) & 0x3ff, (data >> 30) & 0x003);
}
inline Vec4f ConvertFromR10G10B10A2SNorm(uint32_t data)
{
int r = int(data >> 0) & 0x3ff;