> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# D3D12_SAMPLE_POSITION

> 描述用于可编程采样位置的子像素采样位置。

描述用于可编程采样位置的子像素采样位置。

## 语法

```cpp theme={null}
typedef struct D3D12_SAMPLE_POSITION
{
    INT8 X;
    INT8 Y;
} D3D12_SAMPLE_POSITION
```

### 成员

*X*\
类型：INT8

X 轴上的有符号子像素坐标值。

*Y*\
类型：INT8

Y 轴上的有符号子像素坐标值。

## 备注

采样位置以像素中心为原点 (0, 0)。X 和 Y 坐标各自为 -8（上/左）到 7（下/右）范围内的有符号值。超出此范围的值无效。

这些整数值的每一次递增代表 1/16 个像素。例如，X 和 Y 值分别为 -8 和 4 时，对应的浮点值为 -0.5 和 0.25，即位于像素最左侧边缘、中心线与底部边缘中间的点。因此，像素的最下边缘和最右边缘无法通过采样到达（这些位置可作为相邻像素的最上边缘和最左边缘到达）。

## 要求

**头文件：** d3d12\_xs.h 或 d3d12\_x.h\
**库：** d3d12\_xs.lib 或 d3d12\_x.lib\
**支持的平台**：XBOX Series 主机和 XBOX One 系列

## 另请参阅

[Core Structures](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-structures)


## Related topics

- [SetSamplePositions](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist1/methods/id3d12graphicscommandlist1_setsamplepositions_public.md)
- [D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER](/zh-CN/reference/graphics/d3d12/enums/d3d12_programmable_sample_positions_tier_public.md)
- [D3D12_FEATURE_DATA_D3D12_OPTIONS2](/zh-CN/reference/graphics/d3d12/structs/d3d12_feature_data_d3d12_options2_public.md)
- [D3D12_SAMPLER_DESC](/zh-CN/reference/graphics/d3d12/structs/d3d12_sampler_desc_public.md)
- [D3D12_STATIC_SAMPLER_DESC](/zh-CN/reference/graphics/d3d12/structs/d3d12_static_sampler_desc_public.md)
