mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-15 19:16:32 +00:00
Fix handling of UScaled, SScaled in DecodeFormattedComponents
Only UInt and SInt data is stored in integer representation in return from DecodePixelData
This commit is contained in:
@@ -325,14 +325,14 @@ FloatVector DecodeFormattedComponents(const ResourceFormat &fmt, const byte *dat
|
||||
DecodePixelData(fmt, data, val, success);
|
||||
|
||||
FloatVector ret;
|
||||
if(fmt.compType == CompType::UInt || fmt.compType == CompType::UScaled)
|
||||
if(fmt.compType == CompType::UInt)
|
||||
{
|
||||
ret.x = (float)val.uintValue[0];
|
||||
ret.y = (float)val.uintValue[1];
|
||||
ret.z = (float)val.uintValue[2];
|
||||
ret.w = (float)val.uintValue[3];
|
||||
}
|
||||
else if(fmt.compType == CompType::SInt || fmt.compType == CompType::SScaled)
|
||||
else if(fmt.compType == CompType::SInt)
|
||||
{
|
||||
ret.x = (float)val.intValue[0];
|
||||
ret.y = (float)val.intValue[1];
|
||||
|
||||
Reference in New Issue
Block a user