mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 06:56:40 +00:00
Add missing handling of uscaled and sscaled formats
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user