TXTR (Tropical Freeze): Difference between revisions
Jump to navigation
Jump to search
→PAK Metadata
>Aruki No edit summary |
>Aruki |
||
(9 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Offset | ! Offset | ||
! Type | ! style="width:110px;"|Type | ||
! Count | ! style="width:100px;"|Count | ||
! Name | ! style="width:170px;"|Name | ||
! Notes | ! Notes | ||
|- | |- | ||
Line 28: | Line 28: | ||
| 1 | | 1 | ||
| [[#Texture Type|'''Texture Type''']] | | [[#Texture Type|'''Texture Type''']] | ||
| | | Describes the type/dimensionality of the texture (2D texture, 3D texture, cubemap, array of 2D images, etc). | ||
|- | |- | ||
| 0x1C | | 0x1C | ||
Line 34: | Line 34: | ||
| 1 | | 1 | ||
| [[#Texture Format|'''Texture Format''']] | | [[#Texture Format|'''Texture Format''']] | ||
| | | Describes the format that the image data is encoded in. | ||
|- | |- | ||
| 0x20 | | 0x20 | ||
Line 40: | Line 40: | ||
| 1 | | 1 | ||
| '''Width''' | | '''Width''' | ||
| | | Texture X resolution. | ||
|- | |- | ||
| 0x24 | | 0x24 | ||
Line 46: | Line 46: | ||
| 1 | | 1 | ||
| '''Height''' | | '''Height''' | ||
| | | Texture Y resolution. | ||
|- | |- | ||
| 0x28 | | 0x28 | ||
Line 52: | Line 52: | ||
| 1 | | 1 | ||
| '''Depth''' | | '''Depth''' | ||
| | | Texture Z resolution. | ||
|- | |- | ||
| 0x2C | | 0x2C | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | '''Tile Mode''' | ||
| | | Indicates how the texture image data is tiled. | ||
|- | |- | ||
| 0x30 | | 0x30 | ||
Line 64: | Line 64: | ||
| 1 | | 1 | ||
| '''Swizzle''' | | '''Swizzle''' | ||
| | | Indicates how the texture image data is swizzled. | ||
|- | |- | ||
| 0x34 | | 0x34 | ||
Line 75: | Line 75: | ||
| u32 | | u32 | ||
| ''Mipmap Count'' | | ''Mipmap Count'' | ||
| | | '''Mipmap Sizes''' | ||
| | | The size of the base level mipmap is calculated with padding and alignment taken into account. The size of subsequent mipmaps is calculated as Width*Height*Depth*BPP/8. This does '''not''' take padding and alignment into account, and so it does not accurately reflect the amount of space the mipmap takes up in the file, and it cannot be used to accurately locate and read mipmap data. The offset and size needs to be calculated from the other parameters in the header. The game calculates this data by calling GX2CalcSurfaceSizeAndAlignment. | ||
|- | |- | ||
| {{none}} | | {{none}} | ||
Line 88: | Line 88: | ||
| 1 | | 1 | ||
| [[#Texture Filter|'''Texture Filter''']] | | [[#Texture Filter|'''Texture Filter''']] | ||
| | | Determines how the texture is filtered when sampled. | ||
|- | |- | ||
| {{none}} | | {{none}} | ||
| u8 | | u8 | ||
| 1 | | 1 | ||
| [[#Texture Wrap|'''Texture | | [[#Texture Wrap|'''Texture Wrap X''']] | ||
| | | Determines how the texture wraps on the X coordinate. | ||
|- | |- | ||
| {{none}} | | {{none}} | ||
Line 100: | Line 100: | ||
| 1 | | 1 | ||
| [[#Texture Wrap|'''Texture Wrap Y''']] | | [[#Texture Wrap|'''Texture Wrap Y''']] | ||
| | | Determines how the texture wraps on the Y coordinate. | ||
|- | |- | ||
| {{none}} | | {{none}} | ||
Line 106: | Line 106: | ||
| 1 | | 1 | ||
| [[#Texture Wrap|'''Texture Wrap Z''']] | | [[#Texture Wrap|'''Texture Wrap Z''']] | ||
| | | Determines how the texture wraps on the Z coordinate. | ||
|} | |} | ||
Line 115: | Line 115: | ||
{| class="wikitable" | {| class="wikitable" | ||
! ID | ! ID | ||
! | ! Type | ||
|- | |- | ||
| 0 | | 0 | ||
| | | 1D Texture | ||
|- | |- | ||
| 1 | | 1 | ||
| | | 2D Texture | ||
|- | |- | ||
| 2 | | 2 | ||
| | | 3D Texture | ||
|- | |- | ||
| 3 | | 3 | ||
| | | Cube Texture | ||
|- | |- | ||
| 4 | | 4 | ||
| | | 1D Texture Array | ||
|- | |- | ||
| 5 | | 5 | ||
| | | 2D Texture Array | ||
|- | |- | ||
| 6 | | 6 | ||
| | | Multisampled 2D Texture | ||
|- | |- | ||
| 7 | | 7 | ||
| | | Multisampled 2D Texture Array | ||
|} | |} | ||
Line 302: | Line 302: | ||
| 1 | | 1 | ||
| {{unknown|Unknown}} | | {{unknown|Unknown}} | ||
| | | Always 4 | ||
|- | |- | ||
| 0x4 | | 0x4 | ||
Line 319: | Line 319: | ||
| u32 | | u32 | ||
| 1 | | 1 | ||
| | | '''Base Alignment''' | ||
| | | Alignment of the surface image data | ||
|- | |- | ||
| 0x10 | | 0x10 |