Compartir a través de


texture_view::sample Method

Samples the texture at the specified coordinates and level of detail by using the specified sampling configuration.

value_type sample(
   const sampler& _Sampler,
   const coordinates_type& _Coord,
   float _Level_of_detail = 0.0f
) const restrict(amp);

template<
   filter_mode _Filter_mode = filter_linear,
   address_mode _Address_mode = address_clamp
>
value_type sample(
   const coordinates_type& _Coord,
   float _Level_of_detail = 0.0f
) const restrict(amp);

Parameters

  • _Filter_mode
    The filter mode to use to sample the texture_view. The filter mode is the same for the minimization, maximization, and mipmap filters.

  • _Address_mode
    The address mode to use to sample the texture_view. The address mode is the same for all dimensions.

  • _Sampler
    The sampler configuration to use to sample the texture_view.

  • _Coord
    The coordinates to take the sample from. Fractional coordinate values are used to interpolate between texel values.

  • _Level_of_detail
    The value specifies the mipmap level to sample from. Fractional values are used to interpolate between two mipmap levels. The default level of detail is 0, which represents the most detailed mip level.

Return Value

The interpolated sample value.

Requirements

Header: amp_graphics.h

Namespace: concurrency::graphics

See Also

Reference

texture_view Class