EvaluateAttributeAtSample

Description

Interpolates vertex attribute at the current fragment sample position.

Signature

T EvaluateAttributeAtSample<T>(
    T x,
    uint sampleindex)
    where T : __BuiltinArithmeticType;

vector<T, N> EvaluateAttributeAtSample<T, int N>(
    vector<T, N> x,
    uint sampleindex)
    where T : __BuiltinArithmeticType;

matrix<T, N, M> EvaluateAttributeAtSample<T, int N, int M>(
    matrix<T, N, M> x,
    uint sampleindex)
    where T : __BuiltinArithmeticType;

Generic Parameters

T: __BuiltinArithmeticType

N : int

M : int

Parameters

x : T

The vertex attribute to interpolate.

sampleindex : uint

x : vector<T, N>

The vertex attribute to interpolate.

x : matrix<T, N, M>

The vertex attribute to interpolate.

Return value

The interpolated attribute value.

Remarks

x must be a direct reference to a fragment shader varying input.

Availability and Requirements

Defined for the following targets:

hlsl

Available in stages: amplification, fragment, compute, mesh, miss, callable, closesthit, raygen, intersection, anyhit.

glsl

Available in stages: amplification, fragment, compute, mesh, miss, callable, closesthit, raygen, intersection, anyhit.

spirv

Available in stages: amplification, fragment, compute, mesh, miss, callable, closesthit, raygen, intersection, anyhit.

Requires capabilities: SPV_KHR_compute_shader_derivatives, spvMeshShadingEXT.