Full CMaterialInstanceDataResource for Prime 4

This commit is contained in:
Phillip Stephens
2026-01-26 01:39:04 -08:00
parent e62fdd7714
commit d3a6fafb6c
3 changed files with 42 additions and 8 deletions
-7
View File
@@ -119,13 +119,6 @@ typedef struct(int readerVersion, int writerVersion) {
FourCC type <read=ReadMaterialDataType>;
} MaterialType <read=(Str("%s %s", id, type))>;
struct STextureUsageInfo {
uint flags;
uint filter;
uint wrapX;
uint wrapY;
uint wrapZ;
};
struct SSkinnedModelHeader {
uint unk;
+34 -1
View File
@@ -21,6 +21,32 @@ typedef struct {
uchar unk2;
} CVariableDesc <name=(Str("%s %s", type, id))>;
typedef struct {
FourCC id;
uchar type;
switch (type) {
case 2:
int unk;
break;
case 3:
case 4:
case 12:
CColor4f color;
break;
case 5:
case 6:
case 7:
case 8:
GUID texture;
STextureUsageInfo textureUsage;
break;
case 10:
CVector4i unk;
break;
}
} CMaterialInstanceData; // named from CMaterialInstanceDataBuilder, not guaranteed to be accurate
typedef struct {
ChunkDescriptor chunk;
GUID guid1;
@@ -65,8 +91,15 @@ typedef struct {
}
} unkData[unkByte3] <optimize = false>;
}
ubyte unk4;
uint propertyCount;
CMaterialInstanceData data[propertyCount]<optimize = false>;
uint unkFccCount;
struct {
FourCC fcc;
} unkFourCC[unkFccCount];
} else {
uint unk1;
uchar unk2;
+8
View File
@@ -3,6 +3,14 @@
#include "Common.bt"
struct STextureUsageInfo {
uint flags;
uint filter;
uint wrapX;
uint wrapY;
uint wrapZ;
};
// NMaterialInstance::ETrait
enum <uint32> ETrait {
TRAIT_RFBC = 1,