_Texture<T, Shape, isArray, isMS, sampleCount, access, isShadow, isCombined, format>.SampleLevelZero
Description
Samples the texture at a given location using MIP level 0.
Signature
/// Requires Capability Set 1: T _Texture<T, Shape, isArray, isMS, sampleCount, access, isShadow, isCombined, format>.SampleLevelZero( vector<float, isArray+Shape.dimensions> location) where T : ITexelElement where Shape : __ITextureShape where access == 0 where isCombined == 1; /// Requires Capability Set 2: T _Texture<T, Shape, isArray, isMS, sampleCount, access, isShadow, isCombined, format>.SampleLevelZero( vector<float, isArray+Shape.dimensions> location, vector<int, Shape.planeDimensions> offset) where T : ITexelElement where Shape : __ITextureShape where access == 0 where isCombined == 1; /// Requires Capability Set 3: T _Texture<T, Shape, isArray, isMS, sampleCount, access, isShadow, isCombined, format>.SampleLevelZero( vector<float, isArray+Shape.dimensions> location, vector<int, Shape.planeDimensions> offset, out uint status) where T : ITexelElement where Shape : __ITextureShape where access == 0 where isCombined == 1;
Parameters
location : vector<float, isArray + Shape.dimensions>
The location to sample the texture at.
offset : vector<int, Shape.planeDimensions>
Texel offset to apply.
status : uint
[out] The result status of the operation. This parameter is currently only used when targeting HLSL. For other targets, the result status is always 0.
Return value
The sampled texture value.
See Sample() for the full specification.
Remarks
When targeting GLSL, depending on whether implicit derivatives are enabled, this function translates to texture() (derivatives disabled) or textureLod() (derivatives enabled). This allows the use of texture types in stages without implicit derivatives that would otherwise be unusable due to the missing textureLod() variants.
Availability and Requirements
Capability Set 1
Defined for the following targets:
hlsl
Available in all stages.
glsl
Available in all stages.
cpp
Available in all stages.
cuda
Available in all stages.
metal
Available in all stages.
wgsl
Available in all stages.
spirv
Available in all stages.
Capability Set 2
Defined for the following targets:
hlsl
Available in all stages.
glsl
Available in all stages.
cpp
Available in all stages.
metal
Available in all stages.
wgsl
Available in all stages.
spirv
Available in all stages.
Capability Set 3
Defined for the following targets:
hlsl
Available in all stages.
spirv
Available in all stages.
Requires capabilities: SPV_KHR_non_semantic_info, SPV_GOOGLE_user_type, spvDerivativeControl, spvImageQuery, spvImageGatherExtended, spvSparseResidency, spvMinLod, spvFragmentFullyCoveredEXT.
See Also
Sample, SampleBias, SampleLevel, SampleGrad, SampleCmp, SampleCmpLevelZero, SampleCmpLevel, GL_NV_compute_shader_derivatives.