Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Discards the current pixel if the specified value is less than zero.
clip(x) |
---|
Item | Description |
---|---|
x |
[in] The specified value. |
None.
Use the clip HLSL intrinsic function to simulate clipping planes if each component of the x parameter represents the distance from a plane.
Also, use the clip function to test for alpha behavior, as shown in the following example:
clip( Input.Color.A < 0.1f ? -1:1 );
Name | Template Type | Component Type | Size |
---|---|---|---|
x | scalar, vector, or matrix | float | any |
This function is supported in the following shader models.
Shader Model | Supported |
---|---|
Shader Model 4 | yes (pixel shader only) |
Shader Model 3 (DirectX HLSL) | yes (pixel shader only) |
Shader Model 2 (DirectX HLSL) | yes (pixel shader only) |
Shader Model 1 (DirectX HLSL) | yes (pixel shader only) |
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!