Difference between revisions of "Texture Definition"

From owdev
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
0B3 files are in the following format:
+
general 0B3 file layout
  
 
== Types ==  
 
== Types ==  
  
 
   struct texture_t {
 
   struct texture_t {
     uint64 key;   // key of texture
+
     u64 key;               // [[Textures|Texture]]
     uint32 semantic_checksum; // shader input
+
     u32 semantic_checksum; // shader input
     uint32 flags;
+
     u32 flags;
 
   }
 
   }
  
Line 12: Line 12:
  
 
   struct header {
 
   struct header {
     uint64 offset1;        // ?
+
     u64 offset1;        // shader (constants ?) mappings. definition todo.
     uint64 offset2;        // ?
+
     u64 offset2;        // ?
     uint64 texture_offset; // offset to [[#Types|texture_t]] data
+
     u64 texture_offset; // offset to [[#Types|texture_t]] data plugs
     uint64 offset3;        // ?
+
     u64 offset3;        // ?
     uint32 unk1;          // ?
+
     u32 unk1;          // ?
     uint16 unk2;           // ?
+
     u32 mapping_count;
    uint16 unk3;          // ?
+
     u8 texture_count;   // * texture_t
     uint8  texture_count; // * texture_t
+
     u8 offset3_count;   // ?
     uint8  offset3_count; // ?
+
     u8 unk4;           // ?
     uint16 unk4;           // ? might be uint8 + uint8
+
     u8 unk5;            // ?
     uint32 unk5;          // ?
+
    u32 unk6;          // ?
 
   }
 
   }
  
If you seek to texture offset, you get a series of texture_t structures * textureCount
+
If you seek to texture offset, you get a series of texture_t structures * texture_count

Latest revision as of 22:03, 24 June 2016

general 0B3 file layout

Types

 struct texture_t {
   u64 key;               // Texture
   u32 semantic_checksum; // shader input
   u32 flags;
 }

Format

 struct header {
   u64 offset1;        // shader (constants ?) mappings. definition todo.
   u64 offset2;        // ?
   u64 texture_offset; // offset to texture_t data plugs 
   u64 offset3;        // ?
   u32 unk1;           // ?
   u32 mapping_count;
   u8 texture_count;   // * texture_t
   u8 offset3_count;   // ?
   u8 unk4;            // ?
   u8 unk5;            // ?
   u32 unk6;           // ?
 }

If you seek to texture offset, you get a series of texture_t structures * texture_count