EvaluateAttributeAtCentroid function

Evaluates at the pixel centroid.


numeric EvaluateAttributeAtCentroid(
  in attrib numeric value


value [in]

Type: attrib numeric

The input value.


Interpolation mode can be linear or linear_no_perspective on the variable. Use of centroid or sample is ignored. Attributes with constant interpolation are also allowed, in which case the sample index is ignored.

Minimum Shader Model

This function is supported in the following shader models.

Shader Model Supported
Shader Model 5 and higher shader models yes


This function is supported in the following types of shaders:

Vertex Hull Domain Geometry Pixel Compute


See also

Intrinsic Functions

Shader Model 5