The basic data type of a texture sample as expected by a shader.
Must be provided in sg_shader_image and used by the validation
layer in sg_apply_bindings() to check if the provided image object
is compatible with what the shader expects. Apart from the sokol-gfx
validation layer, WebGPU is the only backend API which actually requires
matching texture and sampler type to be provided upfront for validation
(other 3D APIs treat texture/sampler type mismatches as undefined behaviour).
NOTE that the following texture pixel formats require the use
of SG_IMAGESAMPLETYPE_UNFILTERABLE_FLOAT, combined with a sampler
of type SG_SAMPLERTYPE_NONFILTERING:
sg_image_sample_type
The basic data type of a texture sample as expected by a shader. Must be provided in sg_shader_image and used by the validation layer in sg_apply_bindings() to check if the provided image object is compatible with what the shader expects. Apart from the sokol-gfx validation layer, WebGPU is the only backend API which actually requires matching texture and sampler type to be provided upfront for validation (other 3D APIs treat texture/sampler type mismatches as undefined behaviour).
NOTE that the following texture pixel formats require the use of SG_IMAGESAMPLETYPE_UNFILTERABLE_FLOAT, combined with a sampler of type SG_SAMPLERTYPE_NONFILTERING:
- SG_PIXELFORMAT_R32F - SG_PIXELFORMAT_RG32F - SG_PIXELFORMAT_RGBA32F
(when using sokol-shdc, also check out the meta tags @image_sample_type and @sampler_type