Vixen
02b45cc4
csharp
public enum DescriptorSampleType

What a sampled binding's texels are, and — for a sampler — what it does with them.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The half of a descriptor layout that Vulkan and GL infer and WebGPU insists on being told. A Vulkan set layout says "sampled image" and the shader's own type says the rest; a WebGPU bind group layout has to declare filterable float, unfilterable float, depth, sint or uint up front, and a texture whose format disagrees is refused at bind time. So the RHI carries it, the web backend uses it, and the desktop ones read past it.

On a Sampler binding it means the texture that sampler is paired with, which is the same decision stated from the other end: Float is an ordinary filtering sampler, Depth is a shadow-comparison one, and the rest do not filter, because an integer or unfilterable-float texture may not be read through a sampler that does. One field rather than two, because those are not two independent choices — a comparison sampler that reads a colour texture is not a thing any backend will build.

Fields and properties (5)

  • Float

    Floats a sampler may filter — an ordinary colour texture, and the default.

  • UnfilterableFloat

    Floats a sampler may not filter, which is what a 32-bit float texture is unless the device says otherwise.

  • Depth

    Depth. On a sampler binding, a shadow-comparison sampler.

  • SInt

    Signed integers.

  • UInt

    Unsigned integers.

Used by (10)

  • DescriptorBindingVixen.Graphics
  • DescriptorLayoutTestsVixen.Graphics.Tests
  • DescriptorSetLayoutDescriptionVixen.Graphics
  • PixelFormatTestsVixen.Graphics.Tests
  • PixelFormatsVixen.Graphics
  • VulkanDeviceVixen.Graphics.Vulkan
  • VulkanDeviceTestsVixen.Graphics.Vulkan.Tests
  • WebGpuConversionTestsVixen.Graphics.WebGPU.Tests
  • WebGpuConversionsVixen.Graphics.WebGPU
  • WebGpuDeviceTestsVixen.Graphics.WebGPU.Tests