Real-Time Shader Programming (The Morgan Kaufmann Series in Computer Graphics)

With the advent of pixel shaders, some of the texture stage states and texture sampling states are ignored when a pixel shader is active. States that are active can be changed without having to reload the pixel shader.

Table 8.1 shows the texture stage states and how they are active in the pixel shader versions; whereas, Table 8.2 shows the texture sampling states and how they are active in the pixel shader versions.

Table 8.1: Directx 9 Texture Stage State

TEXTURE STAGE STATE

ACTIVE IN THESE PIXEL SHADER VERSIONS

D3DTSS_ADDRESSU/V/W

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_BORDERCOLOR

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_MAGFILTER

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_MINFILTER

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_MIPFILTER

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_MIPMAPLODBIAS

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_MAXMIPLEVEL

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_MAXANISOTROPY

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_BUMPENVLSCALE

1.0, 1.1, 1.2, 1.3, 1.4

D3DTSS_BUMPENVMATnn

1.0, 1.1, 1.2, 1.3, 1.4

D3DTSS_BUMPENVLOFFSET

1.0, 1.1, 1.2, 1.3, 1.4

D3DTSS_TEXCOORDINDEX

Ignored

D3DTSS_TEXTURETRANSFORMFLAGS

Ignored

D3DTSS_COLOROP

Ignored

D3DTSS_ALPHAOP

Ignored

D3DTSS_COLORARGn

Ignored

D3DTSS_ALPHAARGn

Ignored

D3DTSS_RESULTARG

Ignored

Table 8.2: Directx 9 Texture Sampling State

TEXTURE SAMPLING STATE

ACTIVE IN THESE PIXEL SHADER VERSIONS

D3DTSS_ADDRESSU/V/W

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_BORDERCOLOR

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_MAGFILTER

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_MINFILTER

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_MIPFILTER

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_MIPMAPLODBIAS

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_MAXMIPLEVEL

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_MAXANISOTROPY

1.0, 1.1, 1.2, 1.3, 1.4, 2.0

D3DTSS_SRGBTEXTURE

Ignored

D3DTSS_ELEMENTINDEX

Ignored

D3DTSS_DMAPOFFSET

Ignored

Категории