warp.texture_sample#
- warp.texture_sample( ) Any#
Kernel
Sample the 2D texture at the given UV coordinates.
- Parameters:
tex – The 2D texture to sample.
uv – UV coordinates as a vec2f. Range is [0, 1] if the texture was created with
normalized_coords=True(default), or [0, width] x [0, height] ifnormalized_coords=False.dtype – The return type (float, vec2f, or vec4f).
- Returns:
The sampled value of the specified dtype.
Filtering mode is
warp.TextureFilterMode.CLOSESTorwarp.TextureFilterMode.LINEAR.
- warp.texture_sample( ) Any
Kernel
Sample the 2D texture at the given UV coordinates.
- Parameters:
tex – The 2D texture to sample.
u – U coordinate. Range is [0, 1] if the texture was created with
normalized_coords=True(default), or [0, width] ifnormalized_coords=False.v – V coordinate. Range is [0, 1] if the texture was created with
normalized_coords=True(default), or [0, height] ifnormalized_coords=False.dtype – The return type (float, vec2f, or vec4f).
- Returns:
The sampled value of the specified dtype.
Filtering mode is
warp.TextureFilterMode.CLOSESTorwarp.TextureFilterMode.LINEAR.
- warp.texture_sample( ) Any
Kernel
Sample the 3D texture at the given UVW coordinates.
- Parameters:
tex – The 3D texture to sample.
uvw – UVW coordinates as a vec3f. Range is [0, 1] if the texture was created with
normalized_coords=True(default), or [0, width] x [0, height] x [0, depth] ifnormalized_coords=False.dtype – The return type (float, vec2f, or vec4f).
- Returns:
The sampled value of the specified dtype.
Filtering mode is
warp.TextureFilterMode.CLOSESTorwarp.TextureFilterMode.LINEAR.
- warp.texture_sample( ) Any
Kernel
Sample the 3D texture at the given UVW coordinates.
- Parameters:
tex – The 3D texture to sample.
u – U coordinate. Range is [0, 1] if the texture was created with
normalized_coords=True(default), or [0, width] ifnormalized_coords=False.v – V coordinate. Range is [0, 1] if the texture was created with
normalized_coords=True(default), or [0, height] ifnormalized_coords=False.w – W coordinate. Range is [0, 1] if the texture was created with
normalized_coords=True(default), or [0, depth] ifnormalized_coords=False.dtype – The return type (float, vec2f, or vec4f).
- Returns:
The sampled value of the specified dtype.
Filtering mode is
warp.TextureFilterMode.CLOSESTorwarp.TextureFilterMode.LINEAR.