Export (0) Print
Expand All

removeUnusedInputs (HLSL)

Removes unused interpolator inputs from pixel shaders.

Syntax

[removeUnusedInputs]

Parameters

None.

Scope

Applies to an entire pixel shader.

Remarks

Apply the removeUnusedInputs attribute to a pixel shader entry point. This automatically removes unused interpolator inputs.

Without the removeUnusedInputs attribute, the HLSL compiler declares all interpolator inputs in the microcode, whether they are used or not. If interpolator inputs are not used, and the unused attribute is not applied to them, the compiler displays a warning.

The removeUnusedInputs attribute can sometimes improve performance for shaders that are interpolant-bound. Removing unused interpolants allows the shader to spend less time in the interpolant calculation phase.

The removeUnusedInputs attribute is sometimes disadvantageous, because it can cause vertex shader outputs and pixel shader inputs to be mismatched. If the two are mismatched, the shaders are patched, which can decrease performance.

Community Additions

ADD
Show:
© 2014 Microsoft