Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

The alpha test operation involves testing the incoming pixel's alpha value with a reference value and changing the flow of processing based on the results of that test. The alpha test is controlled by a set of render states.

The D3DMRS_ALPHATESTENABLE render state (see D3DMRENDERSTATETYPE) controls whether the alpha test logic is enabled. If the alpha test is enabled the pixel value is controlled by the outcome of the alpha test. If the alpha test is disabled the pixel value is not affected and is processed in the normal way. You can set the value of this render state by calling IDirect3DMobileDevice::SetRenderState.

The D3DMRS_ALPHAREF render state controls the alpha test reference value. The reference value is assumed to be between 0 and 255, inclusive.

The D3DMRS_ALPHAFUNC render state controls the function that is used on the input pixel's alpha value and the alpha reference value.