Shader Cache
shader.cache
file structure:
1
Data_entry[Footer.dataentry_count] shaders
2
Table_entry[Footer.tableentry_count] materials?
3
Footer
Copied!
Number of items: Footer.dataentry_count
1
Data_entry:
2
{
3
u8 hash
4
u1 compression (only present in version > 2)
5
u4 size (only present in version > 2)
6
u4 zsize : compressed size in version > 2, entrysize in version < 3
7
byte[zsize] compressed_data: zlib compressed bytes
8
}
Copied!
Number of items: Footer.tableentry_count
1
Table_entry:
2
{
3
u4 top
4
u4 header1
5
u8 header2
6
u8 header3
7
vlq_bit6_prefixed_string name
8
u4 top2 : same as top1
9
u8 lower1
10
u8 lower2
11
byte[36] unk2
12
u4unkarray unk3
13
u4stringarray strings1
14
u4stringarray strings2
15
}
Copied!
1
vlq_bit6_prefixed_string:
2
{
3
vlq_bit6 len
4
bytes[len] value
5
}
Copied!
1
vlq_bit6:
2
{
3
1 bit sign
4
1 bit continuation
5
6 bit value
6
... shift bits by 7 afterwards
7
}
Copied!
1
u4unkarray:
2
{
3
u4 count
4
byte[32][count] list
5
}
Copied!
1
u4stringarray:
2
{
3
u4 count
4
stringlistentry[count] list
5
}
Copied!
1
stringlistentry:
2
{
3
vlq_bit6_prefixed_string val
4
u1 idx
5
}
Copied!

Footer

1
Footer:
2
{
3
u4 dataentry_count
4
u4 tableentry_count
5
u8 unk2
6
u8 table_offset
7
u8 table_size
8
u8 table_offset again?
9
u4 magic : RDHS
10
u4 version
11
}
Copied!
Copy link
Contents
Footer