Update XGfxDrawSurfFields parsing logic
This commit is contained in:
parent
ae16506d87
commit
51a0d00b93
@ -17,7 +17,20 @@ XGfxDrawSurfFields::XGfxDrawSurfFields()
|
||||
|
||||
void XGfxDrawSurfFields::ParseData(QDataStream *aStream)
|
||||
{
|
||||
|
||||
// Read the raw 64-bit value from the stream
|
||||
quint64 raw = 0;
|
||||
*aStream >> raw;
|
||||
|
||||
// Decode bitfields from the 64-bit packed value
|
||||
mObjectId = raw & 0xFFFF; // bits 0-15
|
||||
mReflectionProbeIndex = (raw >> 16) & 0xFF; // bits 16-23
|
||||
mCustomIndex = (raw >> 24) & 0x1F; // bits 24-28
|
||||
mMaterialSortedIndex = (raw >> 29) & 0x7FF; // bits 29-39
|
||||
mPrepass = (raw >> 40) & 0x3; // bits 40-41
|
||||
mPrimaryLightIndex = (raw >> 42) & 0xFF; // bits 42-49
|
||||
mSurfType = (raw >> 50) & 0xF; // bits 50-53
|
||||
mPrimarySortKey = (raw >> 54) & 0x3F; // bits 54-59
|
||||
mUnused = (raw >> 60) & 0xF; // bits 60-63
|
||||
}
|
||||
|
||||
void XGfxDrawSurfFields::Clear()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user