unused (HLSL)
Note
This HLSL attribute is available only when developing for the Xbox 360.
Suppresses warnings about unused shader parameters.
Syntax
[unused] |
---|
Parameters
None.
Scope
Applies to function parameters.
Remarks
The unused attribute is useful for shaders that use preprocessors, where the same vertex shader is used with different pixel shaders. In this case, a pixel shader may not use some of the inputs.
Examples
The following HLSL code snippet shows how to apply the unused attribute.
float4 main ( float4 coord0 : TEXCOORD0, [unused] float4 coord1 : TEXCOORD1 ) : COLOR { #ifdef SHADER_2 return coord0 + coord1; #else return coord0; #endif }
See Also
Concepts
HLSL Attributes (Xbox 360)
Attribute Syntax
Attribute Categories