Calculate bytesize properly for packed formats in mesh viewer

This commit is contained in:
baldurk
2016-07-25 18:27:13 +02:00
parent eaa53adbc3
commit 132bef38af
2 changed files with 16 additions and 2 deletions
+1 -1
View File
@@ -1714,7 +1714,7 @@ namespace renderdocui.Windows
var fmt = bufferFormats[el].format;
int byteWidth = (int)fmt.compByteWidth;
int bytesToRead = (int)(fmt.compByteWidth * fmt.compCount);
int bytesToRead = (int)bufferFormats[el].ByteSize;
byte[] bytes = read.ReadBytes(bytesToRead);
rawWriter.Write(bytes);