Texture State/PlayStation 3: Difference between revisions

From Burnout Wiki
Content added Content deleted
(Created page.)
 
(Added enumerations.)
 
Line 23: Line 23:
| 0xC || 0x1 || uint8_t || m_maxAniso || ||
| 0xC || 0x1 || uint8_t || m_maxAniso || ||
|-
|-
| 0xD || 0x1 || uint8_t || m_wrapS || ||
| 0xD || 0x1 || uint8_t || m_wrapS || || See [[#renderengine::SamplerState::AddressingMode|AddressingMode]]
|-
|-
| 0xE || 0x1 || uint8_t || m_wrapT || ||
| 0xE || 0x1 || uint8_t || m_wrapT || || See [[#renderengine::SamplerState::AddressingMode|AddressingMode]]
|-
|-
| 0xF || 0x1 || uint8_t || m_wrapR || ||
| 0xF || 0x1 || uint8_t || m_wrapR || || See [[#renderengine::SamplerState::AddressingMode|AddressingMode]]
|-
|-
| 0x10 || 0x1 || uint8_t || m_uRemap || ||
| 0x10 || 0x1 || uint8_t || m_uRemap || || See [[#renderengine::SamplerState::PS3UnsignedRemap|PS3UnsignedRemap]]
|-
|-
| 0x11 || 0x1 || uint8_t || m_zFunc || ||
| 0x11 || 0x1 || uint8_t || m_zFunc || || See [[#renderengine::SamplerState::PS3DepthTextureFunction|PS3DepthTextureFunction]]
|-
|-
| 0x12 || 0x1 || uint8_t || m_gamma || ||
| 0x12 || 0x1 || uint8_t || m_gamma || || See [[#renderengine::SamplerState::PS3TextureGamma|PS3TextureGamma]]
|-
| 0x13 || 0x1 || || || Padding ||
|-
|-
| 0x14 || 0x2 || uint16_t || m_bias || ||
| 0x14 || 0x2 || uint16_t || m_bias || ||
|-
|-
| 0x16 || 0x1 || uint8_t || m_min || ||
| 0x16 || 0x1 || uint8_t || m_min || || See [[#renderengine::SamplerState::FilterMode|FilterMode]]
|-
|-
| 0x17 || 0x1 || uint8_t || m_mag || ||
| 0x17 || 0x1 || uint8_t || m_mag || || See [[#renderengine::SamplerState::FilterMode|FilterMode]]
|-
|-
| 0x18 || 0x1 || uint8_t || m_convolution || ||
| 0x18 || 0x1 || uint8_t || m_convolution || || See [[#renderengine::SamplerState::PS3Convolution|PS3Convolution]]
|-
|-
| 0x19 || 0x3 || || || Padding ||
| 0x19 || 0x3 || || || Padding ||
|}

= Enumerations =
=== renderengine::SamplerState::AddressingMode ===
{| class="wikitable"
! Name !! Value !! Comments
|-
| ADDRESSINGMODE_NA || 0 ||
|-
| ADDRESSINGMODE_WRAP || 1 ||
|-
| ADDRESSINGMODE_MIRROR || 2 ||
|-
| ADDRESSINGMODE_CLAMP_TO_EDGE || 3 ||
|-
| ADDRESSINGMODE_CLAMP || 3 ||
|-
| ADDRESSINGMODE_BORDER || 4 ||
|-
| ADDRESSINGMODE_PS3CLAMP || 5 ||
|-
| ADDRESSINGMODE_MIRROR_ONCE_CLAMP_TO_EDGE || 6 ||
|-
| ADDRESSINGMODE_MIRROR_ONCE_BORDER || 7 ||
|-
| ADDRESSINGMODE_MIRROR_ONCE_CLAMP || 8 ||
|-
| ADDRESSINGMODE_FORCEENUMSIZEINT || 0x7FFFFFFF ||
|}

=== renderengine::SamplerState::PS3UnsignedRemap ===
{| class="wikitable"
! Name !! Value !! Comments
|-
| PS3UNSIGNEDREMAP_NORMAL || 0 ||
|-
| PS3UNSIGNEDREMAP_BIASED || 1 ||
|-
| PS3UNSIGNEDREMAP_FORCEENUMSIZEINT || 0x7FFFFFFF ||
|}

=== renderengine::SamplerState::PS3DepthTextureFunction ===
{| class="wikitable"
! Name !! Value !! Comments
|-
| PS3DEPTHTEXTUREFUNCTION_ZFUNC_NEVER || 0 ||
|-
| PS3DEPTHTEXTUREFUNCTION_ZFUNC_LESS || 1 ||
|-
| PS3DEPTHTEXTUREFUNCTION_ZFUNC_EQUAL || 2 ||
|-
| PS3DEPTHTEXTUREFUNCTION_ZFUNC_LEQUAL || 3 ||
|-
| PS3DEPTHTEXTUREFUNCTION_ZFUNC_GREATER || 4 ||
|-
| PS3DEPTHTEXTUREFUNCTION_ZFUNC_NOTEQUAL || 5 ||
|-
| PS3DEPTHTEXTUREFUNCTION_ZFUNC_GEQUAL || 6 ||
|-
| PS3DEPTHTEXTUREFUNCTION_ZFUNC_ALWAYS || 7 ||
|-
| PS3DEPTHTEXTUREFUNCTION_FORCEENUMSIZEINT || 0x7FFFFFFF ||
|}

=== renderengine::SamplerState::PS3TextureGamma ===
{| class="wikitable"
! Name !! Value !! Comments
|-
| PS3TEXTURE_GAMMA_NONE || 0x0 ||
|-
| PS3TEXTURE_GAMMA_R || 0x1 ||
|-
| PS3TEXTURE_GAMMA_G || 0x2 ||
|-
| PS3TEXTURE_GAMMA_B || 0x4 ||
|-
| PS3TEXTURE_GAMMA_A || 0x8 ||
|-
| PS3TEXTUREGAMMA_FORCEENUMSIZEINT || 0x7FFFFFFF ||
|}

=== renderengine::SamplerState::FilterMode ===
{| class="wikitable"
! Name !! Value !! Comments
|-
| FILTERMODE_NA || 0x0 ||
|-
| PS3FILTERMODE_NEAREST || 0x1 ||
|-
| PS3FILTERMODE_LINEAR || 0x2 ||
|-
| PS3FILTERMODE_NEAREST_NEAREST || 0x3 ||
|-
| PS3FILTERMODE_CONVOLUTION_MAG || 0x4 ||
|-
| PS3FILTERMODE_LINEAR_NEAREST || 0x4 ||
|-
| PS3FILTERMODE_NEAREST_LINEAR || 0x5 ||
|-
| PS3FILTERMODE_LINEAR_LINEAR || 0x6 ||
|-
| PS3FILTERMODE_CONVOLUTION_MIN || 0x7 ||
|-
| FILTERMODE_NONE || 0x10 ||
|-
| FILTERMODE_NEAREST || 0x20 ||
|-
| FILTERMODE_LINEAR || 0x40 ||
|-
| FILTERMODE_CONVOLUTION || 0x80 ||
|-
| FILTERMODE_FORCEENUMSIZEINT || 0x7FFFFFFF ||
|}

=== renderengine::SamplerState::PS3Convolution ===
{| class="wikitable"
! Name !! Value !! Comments
|-
| PS3CONVOLUTION_QUINCUNX || 1 ||
|-
| PS3CONVOLUTION_GAUSSIAN || 2 ||
|-
| PS3CONVOLUTION_QUINCUNX_ALT || 3 ||
|}
|}

Latest revision as of 06:42, 21 September 2023

Structures

renderengine::TextureState

Offset Length Type Name Description Comments
0x0 0x1C SamplerState Base class
0x1C 0x4 Texture texture Texture Imported resource

renderengine::SamplerState

Offset Length Type Name Description Comments
0x0 0x4 uint32_t m_color
0x4 0x4 uint32_t m_enable
0x8 0x2 uint16_t m_minLod
0xA 0x2 uint16_t m_maxLod
0xC 0x1 uint8_t m_maxAniso
0xD 0x1 uint8_t m_wrapS See AddressingMode
0xE 0x1 uint8_t m_wrapT See AddressingMode
0xF 0x1 uint8_t m_wrapR See AddressingMode
0x10 0x1 uint8_t m_uRemap See PS3UnsignedRemap
0x11 0x1 uint8_t m_zFunc See PS3DepthTextureFunction
0x12 0x1 uint8_t m_gamma See PS3TextureGamma
0x13 0x1 Padding
0x14 0x2 uint16_t m_bias
0x16 0x1 uint8_t m_min See FilterMode
0x17 0x1 uint8_t m_mag See FilterMode
0x18 0x1 uint8_t m_convolution See PS3Convolution
0x19 0x3 Padding

Enumerations

renderengine::SamplerState::AddressingMode

Name Value Comments
ADDRESSINGMODE_NA 0
ADDRESSINGMODE_WRAP 1
ADDRESSINGMODE_MIRROR 2
ADDRESSINGMODE_CLAMP_TO_EDGE 3
ADDRESSINGMODE_CLAMP 3
ADDRESSINGMODE_BORDER 4
ADDRESSINGMODE_PS3CLAMP 5
ADDRESSINGMODE_MIRROR_ONCE_CLAMP_TO_EDGE 6
ADDRESSINGMODE_MIRROR_ONCE_BORDER 7
ADDRESSINGMODE_MIRROR_ONCE_CLAMP 8
ADDRESSINGMODE_FORCEENUMSIZEINT 0x7FFFFFFF

renderengine::SamplerState::PS3UnsignedRemap

Name Value Comments
PS3UNSIGNEDREMAP_NORMAL 0
PS3UNSIGNEDREMAP_BIASED 1
PS3UNSIGNEDREMAP_FORCEENUMSIZEINT 0x7FFFFFFF

renderengine::SamplerState::PS3DepthTextureFunction

Name Value Comments
PS3DEPTHTEXTUREFUNCTION_ZFUNC_NEVER 0
PS3DEPTHTEXTUREFUNCTION_ZFUNC_LESS 1
PS3DEPTHTEXTUREFUNCTION_ZFUNC_EQUAL 2
PS3DEPTHTEXTUREFUNCTION_ZFUNC_LEQUAL 3
PS3DEPTHTEXTUREFUNCTION_ZFUNC_GREATER 4
PS3DEPTHTEXTUREFUNCTION_ZFUNC_NOTEQUAL 5
PS3DEPTHTEXTUREFUNCTION_ZFUNC_GEQUAL 6
PS3DEPTHTEXTUREFUNCTION_ZFUNC_ALWAYS 7
PS3DEPTHTEXTUREFUNCTION_FORCEENUMSIZEINT 0x7FFFFFFF

renderengine::SamplerState::PS3TextureGamma

Name Value Comments
PS3TEXTURE_GAMMA_NONE 0x0
PS3TEXTURE_GAMMA_R 0x1
PS3TEXTURE_GAMMA_G 0x2
PS3TEXTURE_GAMMA_B 0x4
PS3TEXTURE_GAMMA_A 0x8
PS3TEXTUREGAMMA_FORCEENUMSIZEINT 0x7FFFFFFF

renderengine::SamplerState::FilterMode

Name Value Comments
FILTERMODE_NA 0x0
PS3FILTERMODE_NEAREST 0x1
PS3FILTERMODE_LINEAR 0x2
PS3FILTERMODE_NEAREST_NEAREST 0x3
PS3FILTERMODE_CONVOLUTION_MAG 0x4
PS3FILTERMODE_LINEAR_NEAREST 0x4
PS3FILTERMODE_NEAREST_LINEAR 0x5
PS3FILTERMODE_LINEAR_LINEAR 0x6
PS3FILTERMODE_CONVOLUTION_MIN 0x7
FILTERMODE_NONE 0x10
FILTERMODE_NEAREST 0x20
FILTERMODE_LINEAR 0x40
FILTERMODE_CONVOLUTION 0x80
FILTERMODE_FORCEENUMSIZEINT 0x7FFFFFFF

renderengine::SamplerState::PS3Convolution

Name Value Comments
PS3CONVOLUTION_QUINCUNX 1
PS3CONVOLUTION_GAUSSIAN 2
PS3CONVOLUTION_QUINCUNX_ALT 3