EvaluateAttributeAtCentroid function

Evaluates at the pixel centroid.

Syntax

numeric EvaluateAttributeAtCentroid(
  in attrib numeric value
);

Parameters

value [in]

Type: attrib numeric

The input value.

Remarks

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 ModelSupported
Shader Model 5 and higher shader modelsyes

 

This function is supported in the following types of shaders:

VertexHullDomainGeometryPixelCompute
x

 

See also

Intrinsic Functions
Shader Model 5

 

 

Show: