Add missing handling of uscaled and sscaled formats

This commit is contained in:
baldurk
2016-07-21 16:06:10 +02:00
parent b6e55cc8d5
commit f492ddab27
5 changed files with 102 additions and 8 deletions
+16
View File
@@ -181,6 +181,14 @@ namespace renderdoc
{
return comp;
}
else if (compType == FormatComponentType.SScaled)
{
return (float)((Int16)comp);
}
else if (compType == FormatComponentType.UScaled)
{
return (float)comp;
}
else if (compType == FormatComponentType.UNorm)
{
return (float)comp / (float)UInt16.MaxValue;
@@ -214,6 +222,14 @@ namespace renderdoc
{
return comp;
}
else if (compType == FormatComponentType.SScaled)
{
return (float)((sbyte)comp);
}
else if (compType == FormatComponentType.UScaled)
{
return (float)comp;
}
else if (compType == FormatComponentType.UNorm)
{
return ((float)comp) / 255.0f;
+2 -2
View File
@@ -236,9 +236,9 @@ namespace renderdoc
if (compType == FormatComponentType.Float)
ret += "float";
else if (compType == FormatComponentType.UInt)
else if (compType == FormatComponentType.UInt || compType == FormatComponentType.UScaled)
ret += "uint";
else if (compType == FormatComponentType.SInt)
else if (compType == FormatComponentType.SInt || compType == FormatComponentType.SScaled)
ret += "int";
else if (compType == FormatComponentType.UNorm)
ret += "unorm float";