Texture State/PC

From Burnout Wiki

Structures

renderengine::TextureState

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

renderengine::SamplerState

Offset Length Type Name Description Comments
0x0 0x4 D3DTEXTUREADDRESS ? U Addressing Mode
0x4 0x4 D3DTEXTUREADDRESS ? V Addressing Mode
0x8 0x4 D3DTEXTUREADDRESS ? W Addressing Mode
0xC 0x4 D3DTEXTUREFILTERTYPE ? Magnification Filter
0x10 0x4 D3DTEXTUREFILTERTYPE ? Minification Filter
0x14 0x4 D3DTEXTUREFILTERTYPE ? Mipmap Filter
0x18 0x4 uint32_t ? Max Mipmap Level
0x1C 0x4 uint32_t ? Max Anisotropy
0x20 0x4 float ? Mipmap LOD Bias
0x24 0x4 D3DCOLOR ? Border Color
0x28 0x4 ? ? Game doesn't access these members
0x2C 0x4 ? ?
0x30 0x4 ? ?
0x34 0x4 ? ?
0x38 0x4 ? ?

Typedefs

D3DCOLOR

From the Microsoft Learn page.

Name Type Length Comments
D3DCOLOR DWORD 0x4 A four byte value that typically represents the alpha, red, green, and blue components of a color. It can also represent luminance and brightness.

Enumerations

D3DTEXTUREADDRESS

From the Microsoft Learn page.

Name Value Comments
D3DTADDRESS_WRAP 1 Tile the texture at every integer junction. For example, for u values between 0 and 3, the texture is repeated three times; no mirroring is performed.
D3DTADDRESS_MIRROR 2 Similar to D3DTADDRESS_WRAP, except that the texture is flipped at every 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.
D3DTADDRESS_CLAMP 3 Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0.0 or 1.0, respectively.
D3DTADDRESS_BORDER 4 Texture coordinates outside the range [0.0, 1.0] are set to the border color.
D3DTADDRESS_MIRRORONCE 5 Similar to D3DTADDRESS_MIRROR and D3DTADDRESS_CLAMP. Takes the absolute value of the texture coordinate (thus, mirroring around 0), and then clamps to the maximum value. The most common usage is for volume textures, where support for the full D3DTADDRESS_MIRRORONCE texture-addressing mode is not necessary, but the data is symmetric around the one axis.
D3DTADDRESS_FORCE_DWORD 0x7FFFFFFF Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.

D3DTEXTUREFILTERTYPE

From the Microsoft Learn page.

Name Value Comments
D3DTEXF_NONE 0 When used with D3DSAMP_MIPFILTER, disables mipmapping.
D3DTEXF_POINT 1 When used with D3DSAMP_MAGFILTER or D3DSAMP_MINFILTER, specifies that point filtering is to be used as the texture magnification or minification filter respectively. When used with D3DSAMP_MIPFILTER, enables mipmapping and specifies that the rasterizer chooses the color from the texel of the nearest mip level.
D3DTEXF_LINEAR 2 When used with D3DSAMP_MAGFILTER or D3DSAMP_MINFILTER, specifies that linear filtering is to be used as the texture magnification or minification filter respectively. When used with D3DSAMP_MIPFILTER, enables mipmapping and trilinear filtering; it specifies that the rasterizer interpolates between the two nearest mip levels.
D3DTEXF_ANISOTROPIC 3 When used with D3DSAMP_MAGFILTER or D3DSAMP_MINFILTER, specifies that anisotropic texture filtering used as a texture magnification or minification filter respectively. Compensates for distortion caused by the difference in angle between the texture polygon and the plane of the screen. Use with D3DSAMP_MIPFILTER is undefined.
D3DTEXF_PYRAMIDALQUAD 6 A 4-sample tent filter used as a texture magnification or minification filter. Use with D3DSAMP_MIPFILTER is undefined.
D3DTEXF_GAUSSIANQUAD 7 A 4-sample Gaussian filter used as a texture magnification or minification filter. Use with D3DSAMP_MIPFILTER is undefined.
D3DTEXF_CONVOLUTIONMONO 8 Convolution filter for monochrome textures. See D3DFMT_A1. This flag is available in Direct3D 9Ex only. Use with D3DSAMP_MIPFILTER is undefined.
D3DTEXF_FORCE_DWORD 0x7FFFFFFF Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.