Difference between revisions of "Texture Definition"

From owdev
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
  
 
   struct texture_t {
 
   struct texture_t {
     u64 key04;         // 'file' reference/'name' of texture
+
     u64 key;               // [[Textures|Texture]]
     u32 smt_checksum;   // shader input
+
     u32 semantic_checksum; // shader input
 
     u32 flags;
 
     u32 flags;
 
   }
 
   }
Line 14: Line 14:
 
     u64 offset1;        // shader (constants ?) mappings. definition todo.
 
     u64 offset1;        // shader (constants ?) mappings. definition todo.
 
     u64 offset2;        // ?
 
     u64 offset2;        // ?
     u64 textures;       // offset to texture_t data plugs  
+
     u64 texture_offset; // offset to [[#Types|texture_t]] data plugs  
 
     u64 offset3;        // ?
 
     u64 offset3;        // ?
 
     u32 unk1;          // ?
 
     u32 unk1;          // ?
     u32 nr_mappings;
+
     u32 mapping_count;
 
     u8 texture_count;  // * texture_t
 
     u8 texture_count;  // * texture_t
 
     u8 offset3_count;  // ?
 
     u8 offset3_count;  // ?
Line 25: Line 25:
 
   }
 
   }
  
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