Texture State/Remastered

From Burnout Wiki

Structures

renderengine::TextureState

32-bit

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

64-bit

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

renderengine::SamplerState

32-bit

Offset Length Type Name Description Comments
0x0 0x4 D3D11_TEXTURE_ADDRESS_MODE ? Address mode U
0x4 0x4 D3D11_TEXTURE_ADDRESS_MODE ? Address mode V
0x8 0x4 D3D11_TEXTURE_ADDRESS_MODE ? Address mode W
0xC 0x4 D3D11_FILTER_TYPE ? Magnification filter if any filter is set to 2, game uses anisotropic filtering
0x10 0x4 D3D11_FILTER_TYPE ? Minification filter
0x14 0x4 D3D11_FILTER_TYPE ? Mipmap filter
0x18 0x4 float ? Minimum LOD
0x1C 0x4 float ? Maximum LOD
0x20 0x4 uint32_t ? Maximum anisotropy
0x24 0x4 float ? Mipmap LOD bias
0x28 0x4 D3D11_COMPARISON_FUNC ? Comparsion function If set to -1, D3D11_COMPARISON_ALWAYS used
0x2C 0x1 bool ? White border color Set to black if false
0x2D 0x3 Padding
0x30 0x4 uint32_t ? Reference count Initially set to 1
Decremented by each call to Release on the interface
0x34 0x4 ID3D11SamplerState* ? Sampler state interface Set at runtime

64-bit

Offset Length Type Name Description Comments
0x0 0x4 D3D11_TEXTURE_ADDRESS_MODE ? Address mode U
0x4 0x4 D3D11_TEXTURE_ADDRESS_MODE ? Address mode V
0x8 0x4 D3D11_TEXTURE_ADDRESS_MODE ? Address mode W
0xC 0x4 D3D11_FILTER_TYPE ? Magnification filter if any filter is set to 2, game uses anisotropic filtering
0x10 0x4 D3D11_FILTER_TYPE ? Minification filter
0x14 0x4 D3D11_FILTER_TYPE ? Mipmap filter
0x18 0x4 float ? Minimum LOD
0x1C 0x4 float ? Maximum LOD
0x20 0x4 uint32_t ? Maximum anisotropy
0x24 0x4 float ? Mipmap LOD bias
0x28 0x4 D3D11_COMPARISON_FUNC ? Comparsion function If set to -1, D3D11_COMPARISON_ALWAYS used
0x2C 0x1 bool ? White border color Set to black if false
0x2D 0x3 Padding
0x30 0x4 uint32_t ? Reference count Initially set to 1
Decremented by each call to Release on the interface
0x34 0x4 Padding
0x38 0x8 ID3D11SamplerState* ? Sampler state interface Set at runtime

Enumerations

D3D11_TEXTURE_ADDRESS_MODE

From the Microsoft Learn page.

Name Value Comments
D3D11_TEXTURE_ADDRESS_WRAP 1 Tile the texture at every (u,v) integer junction. For example, for u values between 0 and 3, the texture is repeated three times.
D3D11_TEXTURE_ADDRESS_MIRROR 2 Flip the texture at every (u,v) integer junction. For u values between 0 and 1, for example, the texture is addressed normally; between 1 and 2, the texture is flipped (mirrored); between 2 and 3, the texture is normal again; and so on.
D3D11_TEXTURE_ADDRESS_CLAMP 3 Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0.0 or 1.0, respectively.
D3D11_TEXTURE_ADDRESS_BORDER 4 Texture coordinates outside the range [0.0, 1.0] are set to the border color specified in D3D11_SAMPLER_DESC or HLSL code.
D3D11_TEXTURE_ADDRESS_MIRROR_ONCE 5 Similar to D3D11_TEXTURE_ADDRESS_MIRROR and D3D11_TEXTURE_ADDRESS_CLAMP. Takes the absolute value of the texture coordinate (thus, mirroring around 0), and then clamps to the maximum value.

D3D11_FILTER_TYPE

From the Microsoft Learn page.

Name Value Comments
D3D11_FILTER_TYPE_POINT 0 Point filtering used as a texture magnification or minification filter. The texel with coordinates nearest to the desired pixel value is used. The texture filter to be used between mipmap levels is nearest-point mipmap filtering. The rasterizer uses the color from the texel of the nearest mipmap texture.
D3D11_FILTER_TYPE_LINEAR 1 Bilinear interpolation filtering used as a texture magnification or minification filter. A weighted average of a 2 x 2 area of texels surrounding the desired pixel is used. The texture filter to use between mipmap levels is trilinear mipmap interpolation. The rasterizer linearly interpolates pixel color, using the texels of the two nearest mipmap textures.

D3D11_COMPARISON_FUNC

From the Microsoft Learn page.

Name Value Comments
D3D11_COMPARISON_NEVER 1 Never pass the comparison.
D3D11_COMPARISON_LESS 2 If the source data is less than the destination data, the comparison passes.
D3D11_COMPARISON_EQUAL 3 If the source data is equal to the destination data, the comparison passes.
D3D11_COMPARISON_LESS_EQUAL 4 If the source data is less than or equal to the destination data, the comparison passes.
D3D11_COMPARISON_GREATER 5 If the source data is greater than the destination data, the comparison passes.
D3D11_COMPARISON_NOT_EQUAL 6 If the source data is not equal to the destination data, the comparison passes.
D3D11_COMPARISON_GREATER_EQUAL 7 If the source data is greater than or equal to the destination data, the comparison passes.
D3D11_COMPARISON_ALWAYS 8 Always pass the comparison.