Texture/Remastered: Difference between revisions
m
no edit summary
(Created page based on Matt's research.) |
mNo edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1:
=
At least partially derived from [https://
===
==== 32-bit ====
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 ||
|-
| 0x4 || 0x4 ||
|-
| 0x8 || 0x4 ||
|-
| 0xC || 0x4 || void* || ? || Pixel data || Offset in file. The game sets this pointer in memory.
Line 20 ⟶ 21:
| 0x18 || 0x4 || ? || ? || ||
|-
| 0x1C || 0x4 || [[#DXGI_FORMAT|DXGI_FORMAT]] || Format || A DXGI_FORMAT enumeration specifying the format the texture will be in after it is loaded. ||
|-
| 0x20 || 0x4 || uint32_t || ? || Flags || See [[#Flags|flags]]
|-
| 0x24 || 0x2 || uint16_t || Width || The target width of the texture. If the actual width of the texture is larger or smaller than this value then the texture will be scaled up or down to fit this target width. ||
Line 38 ⟶ 39:
| 0x2E || 0x2 || ? || ? || ||
|-
| 0x30 || 0x4 ||
|-
| 0x34 || 0x4 ||
|-
| 0x38 || 0x4 ||
|-
| 0x3C || 0x4 ||
|}
====
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 ||
|-
| 0x8 || 0x4 || ? || ? || ||
Line 81 ⟶ 66:
| 0x28 || 0x4 || ? || ? || ||
|-
| 0x2C || 0x4 || [[#DXGI_FORMAT|DXGI_FORMAT]] || Format || A DXGI_FORMAT enumeration specifying the format the texture will be in after it is loaded. ||
|-
| 0x30 || 0x4 || uint32_t || ? || Flags ||
Line 99 ⟶ 84:
| 0x3E || 0x2 || ? || ? || ||
|-
| 0x40 ||
|-
| 0x48 || 0x4 || ? || ? || ||
|-
| 0x4C || 0x4 ||
|-
| 0x50 || 0x8 || void* || ? || Texture data || nullptr in file. Set in memory. Used on PS4
|}
= Unions =
=== Texture interface ===
Anonymous union.
==== 32-bit ====
{| class="wikitable"
! Length !! Type !! Name !! Description !! Comments
|-
| 0x4 || ID3D11Resource* || m_resource || Resource interface ||
|-
| 0x4 || ID3D11Texture1D* || m_texture1d || 1D texture interface ||
|-
| 0x4 || ID3D11Texture2D* || m_texture2d || 2D texture interface ||
|-
| 0x4 || ID3D11Texture3D* || m_texture3d || 3D texture interface ||
|}
==== 64-bit ====
{| class="wikitable"
! Length !! Type !! Name !! Description !! Comments
|-
| 0x8 || ID3D11Resource* || m_resource || Resource interface ||
|-
| 0x8 || ID3D11Texture1D* || m_texture1d || 1D texture interface ||
|-
| 0x8 || ID3D11Texture2D* || m_texture2d || 2D texture interface ||
|-
| 0x8 || ID3D11Texture3D* || m_texture3d || 3D texture interface ||
|}
= Enumerations =
=== D3D11_USAGE ===
From [https://learn.microsoft.com/en-us/windows/win32/api/d3d11/ne-d3d11-d3d11_usage D3D11_USAGE on Microsoft Learn].
{| class="wikitable"
! Name !! Value !! Comments
|-
| D3D11_USAGE_DEFAULT || 0 ||
|-
| D3D11_USAGE_IMMUTABLE || 1 ||
|-
| D3D11_USAGE_DYNAMIC || 2 ||
|-
| D3D11_USAGE_STAGING || 3 ||
|}
=== Dimension ===
{| class="wikitable"
! Name !! Value !! Comments
|-
| ? || 6 || 1D texture
|-
| ? || 7 || 2D texture
|-
| ? || 8 || 3D texture
|-
| ? || 9 || Cube texture
|}
=== DXGI_FORMAT ===
From [https://
{| class="wikitable"
! Name !! Value !! Comments
|-
| DXGI_FORMAT_UNKNOWN || 0 || The format is not known.
|-
Line 356 ⟶ 401:
|-
| DXGI_FORMAT_FORCE_UINT || 0xFFFFFFFF || Forces this enumeration to compile to 32 bits in size. This value is not used.
|}
=== Flags ===
{| class="wikitable"
! Name !! Value !! Comments
|-
| ? || 0x1 ||
|-
| ? || 0x2 ||
|-
| ? || 0x4 ||
|-
| ? || 0x8 ||
|-
| ? || 0x10 ||
|-
| ? || 0x20 ||
|-
| ? || 0x40 ||
|-
| ? || 0x80 ||
|-
| ? || 0x100 ||
|-
| ? || 0x200 ||
|}
|