warp.texture_sample#
- warp.texture_sample( ) Any#
Kernel
Sample the 1D texture at the given U coordinate.
Experimental
The texture API is experimental and subject to change. See
warp.Texture.- Parameters:
tex – The 1D 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.dtype – The return type (
float,warp.vec2f, orwarp.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.
Experimental
The texture API is experimental and subject to change. See
warp.Texture.- Parameters:
tex – The 2D texture to sample.
uv – UV coordinates as a
warp.vec2f. Range is [0, 1] if the texture was created withnormalized_coords=True(default), or [0, width] x [0, height] ifnormalized_coords=False.dtype – The return type (
float,warp.vec2f, orwarp.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.
Experimental
The texture API is experimental and subject to change. See
warp.Texture.- 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,warp.vec2f, orwarp.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.
Experimental
The texture API is experimental and subject to change. See
warp.Texture.- Parameters:
tex – The 3D texture to sample.
uvw – UVW coordinates as a
warp.vec3f. Range is [0, 1] if the texture was created withnormalized_coords=True(default), or [0, width] x [0, height] x [0, depth] ifnormalized_coords=False.dtype – The return type (
float,warp.vec2f, orwarp.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.
Experimental
The texture API is experimental and subject to change. See
warp.Texture.- 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,warp.vec2f, orwarp.vec4f).
- Returns:
The sampled value of the specified
dtype.
Filtering mode is
warp.TextureFilterMode.CLOSESTorwarp.TextureFilterMode.LINEAR.