Shader Parameter: Difference between revisions
Content added Content deleted
(Created page.) |
(Update with info from B5FinalFIGS symbols.) |
||
Line 11: | Line 11: | ||
= Structures = |
= Structures = |
||
=== |
=== ShaderParams === |
||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || |
| 0x0 || 0xC || [[#ParameterBlock|ParameterBlock]] || || Base class || |
||
|} |
|||
=== ParameterBlock === |
|||
{| class="wikitable" |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
| 0x0 || 0x4 || [[#ParameterSemanticBlock|ParameterSemanticBlock]]* || mpSemanticBlock || Entry info || |
|||
|- |
|- |
||
| 0x4 || 0x4 || |
| 0x4 || 0x4 || uint32_t* || mpParameterBlock || Parameter data || Floats in reality, not ints |
||
|- |
|- |
||
| 0x8 || 0x4 || uint32_t || |
| 0x8 || 0x4 || uint32_t || mDataSize || Data count || |
||
|} |
|} |
||
=== |
=== ParameterSemanticBlock === |
||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x4 || |
| 0x0 || 0x4 || uint || mCount || Number of semantics || |
||
|- |
|- |
||
| 0x4 || 0x4 || |
| 0x4 || 0x4 || uint || mDataSize || Data count || Same as header data count |
||
|- |
|- |
||
| 0x8 || 0x4 || [[# |
| 0x8 || 0x4 || [[#ParameterSemantic|ParameterSemantic]] || mpSemantics || Semantics || |
||
|} |
|} |
||
=== |
=== ParameterSemantic === |
||
{| class="wikitable" |
{| class="wikitable" |
||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x4 || |
| 0x0 || 0x4 || void* || m_hParameter || Parameter || Set at runtime |
||
|- |
|- |
||
| 0x4 || 0x4 || char* || |
| 0x4 || 0x4 || char* || m_Namespace || Namespace name || |
||
|- |
|- |
||
| 0x8 || 0x4 || uint32_t || |
| 0x8 || 0x4 || uint32_t || m_NamespaceId || Namespace name CRC32 hash || |
||
|- |
|- |
||
| 0xC || 0x4 || char* || |
| 0xC || 0x4 || char* || m_Semantic || Semantic name || Includes:<br />INSTANCE<br />MATERIAL<br />LIGHTD |
||
|- |
|- |
||
| 0x10 || 0x4 || uint32_t || |
| 0x10 || 0x4 || uint32_t || m_SemanticId || Semantic name CRC32 hash || |
||
|- |
|- |
||
| 0x14 || 0x4 || |
| 0x14 || 0x4 || void* || m_pData || Data || Set at runtime |
||
|- |
|- |
||
| 0x18 || 0x2 || uint16_t || |
| 0x18 || 0x2 || uint16_t || m_uNum || || Always 1 |
||
|- |
|- |
||
| 0x1A || 0x1 || uint8_t || |
| 0x1A || 0x1 || uint8_t || m_uStride || Stride || |
||
|- |
|- |
||
| 0x1B || 0x1 || |
| 0x1B || 0x1 || uint8_t || m_uType || Type || Always 0 |
||
|} |
|} |
Latest revision as of 19:51, 7 October 2023
RwShaderParameter | |||
---|---|---|---|
aka ShaderParameter | |||
Type ID | 0x14 | ||
Category | Generic | ||
Memory distribution |
Main Memory only | ||
Imported by | Material Technique | ||
Editor available? |
No |
Shader parameters are used in Black 2 (2006-06-29 build). Their purpose is unclear and the type was deprecated by the time Burnout 5 (2006-11-13 build) was built.
Structures
ShaderParams
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0xC | ParameterBlock | Base class |
ParameterBlock
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | ParameterSemanticBlock* | mpSemanticBlock | Entry info | |
0x4 | 0x4 | uint32_t* | mpParameterBlock | Parameter data | Floats in reality, not ints |
0x8 | 0x4 | uint32_t | mDataSize | Data count |
ParameterSemanticBlock
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | uint | mCount | Number of semantics | |
0x4 | 0x4 | uint | mDataSize | Data count | Same as header data count |
0x8 | 0x4 | ParameterSemantic | mpSemantics | Semantics |
ParameterSemantic
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | void* | m_hParameter | Parameter | Set at runtime |
0x4 | 0x4 | char* | m_Namespace | Namespace name | |
0x8 | 0x4 | uint32_t | m_NamespaceId | Namespace name CRC32 hash | |
0xC | 0x4 | char* | m_Semantic | Semantic name | Includes: INSTANCE MATERIAL LIGHTD |
0x10 | 0x4 | uint32_t | m_SemanticId | Semantic name CRC32 hash | |
0x14 | 0x4 | void* | m_pData | Data | Set at runtime |
0x18 | 0x2 | uint16_t | m_uNum | Always 1 | |
0x1A | 0x1 | uint8_t | m_uStride | Stride | |
0x1B | 0x1 | uint8_t | m_uType | Type | Always 0 |