Difference between revisions of "SHBIN"

From 3dbrew
Jump to navigation Jump to search
m
Line 4: Line 4:
 
The SHBIN (SHader BINary) file is used to contain compiled VSH (Vertex SHader) files. These VSH files are shaders that can be used for vertexes.
 
The SHBIN (SHader BINary) file is used to contain compiled VSH (Vertex SHader) files. These VSH files are shaders that can be used for vertexes.
  
A SHBIN contains a header, then a DVLP, then DVLE(s) (depending on a variable in the header)
+
A SHBIN's structure starts with a header, then a DVLP, then DVLE(s) (depending on a variable in the header)
  
 
== Header ==
 
== Header ==

Revision as of 07:05, 29 January 2013

Overview

The SHBIN (SHader BINary) file is used to contain compiled VSH (Vertex SHader) files. These VSH files are shaders that can be used for vertexes.

A SHBIN's structure starts with a header, then a DVLP, then DVLE(s) (depending on a variable in the header)

Header

OFFSET SIZE DESCRIPTION
0x0 0x4 MAGIC "DVLB"
0x4 0x4 Amount of DVLEs in SHBIN
0x8 0x4 DVLE 1 offset

If there is more than 1 DVLE ( Amount > 0x01 ) the header continues with more offsets.

So if there are 3 DVLEs then 0xC would be DVLE 2's offset, 0x10 would be DVLE 3's offset, ect...

The DVLP file comes directly after the header.

DVLP

OFFSET SIZE DESCRIPTION
0x0 0x4 MAGIC "DVLP"

DVLE

OFFSET SIZE DESCRIPTION
0x0 0x4 MAGIC "DVLE"