if pred - ps
Microsoft DirectX 9.0 SDK Update (October 2004)

if pred - ps


Start of an if bool...else...endif block, with the condition taken from the content of the predicate register.

Syntax

if [!]pred.replicateSwizzle

Where:

Remarks

Pixel shader versions1_11_21_31_42_02_x2_sw3_03_sw
if_predxxxx

This instruction is used to skip a block of code, based on a channel of the predicate register. Each if_pred block must end with an else or endif instruction.

Restrictions include:

if_pred blocks can be nested. This counts to the total dynamic nesting depth along with if_comp blocks.

An if_pred block cannot straddle a loop block; it should either be completely inside it or surround it.



© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.