Texture/PlayStation 3: Difference between revisions
m
Normalization
(Created page.) |
m (Normalization) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1:
=
The majority of this information is from the SCE PS3 SDK: CellGcmTexture datatype reference, though Burnout's debugging symbols were also referenced.
Line 6:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x1 || uint8_t || m_format || Texture format || See [[#Format
|-
| 0x1 || 0x1 || uint8_t || m_mipmap || Number of mipmap levels (1-13) || Sum of the maximum number of mipmap levels for the texture + 1
|-
| 0x2 || 0x1 || uint8_t || m_dimension || Texture dimension || See [[#Dimension
|-
| 0x3 || 0x1 || uint8_t || m_cubemap || Enable or disable cube mapping || See [[#CubeMapEnable
|-
| 0x4 || 0x4 || uint32_t || m_remap || Method of selecting each element of the color value || See [[#Remap
|-
| 0x8 || 0x2 || uint16_t || m_width || Width of texture (1-4096) ||
Line 22:
| 0xC || 0x2 || uint16_t || m_depth || Depth of texture (1-512) || Always 1 in Burnout as 3D textures are not used
|-
| 0xE || 0x1 || uint8_t || m_location || Location of texture data (main memory or local memory) || See [[#Location
|-
| 0xF || 0x1 || uint8_t || m_padding || Padding ||
|-
| 0x10 || 0x4 || uint32_t || m_pitch || Pitch size of texture || See [[#Pitch
|-
| 0x14 || 0x4 || uint32_t || m_offset || Offset value from the base address of the texture data location ||
|-
| 0x18 || 0x4 || void
|-
| 0x1C || 0x4 || [[#renderengine::Texture::Type|Type]] || m_storeType || Store type ||
|-
| 0x20 || 0x4 || uint32_t || m_storeFlags || Store flags || Seemingly unused
Line 41:
Below is the bitwise structure for the format field.
{| class="wikitable"
! Offset (bits) !! Length (bits) !! Name !! Description !! Comments
|-
|-
|
|-
|
|-
|
▲| 7 || 1 || Unused, always 1
|}
Line 57:
{| class="wikitable"
|+ Format 0x88
! Bit value !! 1 !! 0 !! 0 !! 0 !! 1 !! 0 !! 0 !! 0
|-
| '''Parsed value''' || 1 || 0 || 0 || colspan=5
|-
| '''Description''' || Unused || CELL_GCM_TEXTURE_NR || CELL_GCM_TEXTURE_SZ || colspan=5
|}
Line 75 ⟶ 74:
These are not used in Burnout, so the remap field is unused.
Below is the bitwise structure for the remap field. It is unclear whether this is in MSB 0 or LSB 0 notation.
{| class="wikitable"
! Offset (bits) !! Length (bits) !! Name !! Description !! Comments
|-
| 0 || 16 || || Remap order ||
|-
|
|-
|
|-
|
|-
|
|-
|
|-
|
|-
|
|-
|
|}
Line 221 ⟶ 219:
=== renderengine::Texture::Type ===
{| class="wikitable"
! Name !! Value !! Comments
|-
|