?/TD>
Microsoft DirectX 9.0

Multielement Texture


Traditional textures are considered to be single-element textures. Multielement textures enable applications to write out to multiple elements of a texture, simultaneously, from the pixel shader. The result in the next rendering pass is that an application can use one or more of the elements as a single-element texture—that is, as inputs to the pixel shader. These additional elements can be thought of as a temporary store for intermediate results that will be used in a later pass by the application. The first generation of hardware that exposes this feature has the following restrictions.

The usage is documented in the following list.

API Changes

The following are the proposed application programming interface (API) changes to support this feature. New surface formats like the ones shown here express the interleaved nature of the format.

A new interleaved surface format:

D3DFMT_MULTI2_ARGB8    = MAKEFOURCC('M','E','T','1'),

A new sampler state to indicate which element to pick up:

D3DSAMP_ELEMENTINDEX

New render states:

D3DRS_COLORWRITEENABLE1
D3DRS_COLORWRITEENABLE2
D3DRS_COLORWRITEENABLE3

D3DRS_COLORWRITEENABLE applies to render target (or element) zero.

New hardware caps:

D3DPMISCCAPS_INDEPENDENTWRITEMASKS // True if they can support it


© 2002 Microsoft Corporation. All rights reserved.