Microsoft DirectX 9.0


Scissor Test API

The scissor rectangle is managed by a device render state. A scissor test is enabled or disabled by setting the renderstate to TRUE or FALSE. This test is performed after the fragment color is computed but before alpha testing. SetRenderTarget resets the scissor recttangle to the full render target, analogous to the viewport reset. SetScissorRect is recorded by the stateblocks (and the CreateStateBlock with pixel state and all state). The scissor test also affects the device Clear operation.

// methods
HRESULT IDirect3DDevice9::SetScissorRect( CONST RECT* pRect ); 
HRESULT IDirect3DDevice9::GetScissorRect( RECT* pRect ); 
// new RenderState, values are TRUE or FALSE 
// new hardware cap 

The default scissor rect is the full viewport.

Scissor testing is done just after pixel processing is completed by a pixel shader or the fixed function pipeline, as shown below.

Scissor test flowchart

© 2002 Microsoft Corporation. All rights reserved.