warp.texture\_sample ==================== .. function:: warp._src.lang.texture_sample(tex: Texture1D, u: float32, dtype: Any) -> Any .. hlist:: :columns: 8 * Kernel Sample the 1D texture at the given U coordinate. .. admonition:: Experimental The texture API is experimental and subject to change. See :class:`warp.Texture`. :param tex: The 1D texture to sample. :param u: U coordinate. Range is [0, 1] if the texture was created with ``normalized_coords=True`` (default), or [0, width] if ``normalized_coords=False``. :param dtype: The return type (``float``, :class:`warp.vec2f`, or :class:`warp.vec4f`). :returns: The sampled value of the specified ``dtype``. Filtering mode is :attr:`warp.TextureFilterMode.CLOSEST` or :attr:`warp.TextureFilterMode.LINEAR`. .. function:: warp._src.lang.texture_sample(tex: Texture2D, uv: vec2f, dtype: Any) -> Any :noindex: .. hlist:: :columns: 8 * Kernel Sample the 2D texture at the given UV coordinates. .. admonition:: Experimental The texture API is experimental and subject to change. See :class:`warp.Texture`. :param tex: The 2D texture to sample. :param uv: UV coordinates as a :class:`warp.vec2f`. Range is [0, 1] if the texture was created with ``normalized_coords=True`` (default), or [0, width] x [0, height] if ``normalized_coords=False``. :param dtype: The return type (``float``, :class:`warp.vec2f`, or :class:`warp.vec4f`). :returns: The sampled value of the specified ``dtype``. Filtering mode is :attr:`warp.TextureFilterMode.CLOSEST` or :attr:`warp.TextureFilterMode.LINEAR`. .. function:: warp._src.lang.texture_sample(tex: Texture2D, u: float32, v: float32, dtype: Any) -> Any :noindex: .. hlist:: :columns: 8 * Kernel Sample the 2D texture at the given UV coordinates. .. admonition:: Experimental The texture API is experimental and subject to change. See :class:`warp.Texture`. :param tex: The 2D texture to sample. :param u: U coordinate. Range is [0, 1] if the texture was created with ``normalized_coords=True`` (default), or [0, width] if ``normalized_coords=False``. :param v: V coordinate. Range is [0, 1] if the texture was created with ``normalized_coords=True`` (default), or [0, height] if ``normalized_coords=False``. :param dtype: The return type (``float``, :class:`warp.vec2f`, or :class:`warp.vec4f`). :returns: The sampled value of the specified ``dtype``. Filtering mode is :attr:`warp.TextureFilterMode.CLOSEST` or :attr:`warp.TextureFilterMode.LINEAR`. .. function:: warp._src.lang.texture_sample(tex: Texture3D, uvw: vec3f, dtype: Any) -> Any :noindex: .. hlist:: :columns: 8 * Kernel Sample the 3D texture at the given UVW coordinates. .. admonition:: Experimental The texture API is experimental and subject to change. See :class:`warp.Texture`. :param tex: The 3D texture to sample. :param uvw: UVW coordinates as a :class:`warp.vec3f`. Range is [0, 1] if the texture was created with ``normalized_coords=True`` (default), or [0, width] x [0, height] x [0, depth] if ``normalized_coords=False``. :param dtype: The return type (``float``, :class:`warp.vec2f`, or :class:`warp.vec4f`). :returns: The sampled value of the specified ``dtype``. Filtering mode is :attr:`warp.TextureFilterMode.CLOSEST` or :attr:`warp.TextureFilterMode.LINEAR`. .. function:: warp._src.lang.texture_sample(tex: Texture3D, u: float32, v: float32, w: float32, dtype: Any) -> Any :noindex: .. hlist:: :columns: 8 * Kernel Sample the 3D texture at the given UVW coordinates. .. admonition:: Experimental The texture API is experimental and subject to change. See :class:`warp.Texture`. :param tex: The 3D texture to sample. :param u: U coordinate. Range is [0, 1] if the texture was created with ``normalized_coords=True`` (default), or [0, width] if ``normalized_coords=False``. :param v: V coordinate. Range is [0, 1] if the texture was created with ``normalized_coords=True`` (default), or [0, height] if ``normalized_coords=False``. :param w: W coordinate. Range is [0, 1] if the texture was created with ``normalized_coords=True`` (default), or [0, depth] if ``normalized_coords=False``. :param dtype: The return type (``float``, :class:`warp.vec2f`, or :class:`warp.vec4f`). :returns: The sampled value of the specified ``dtype``. Filtering mode is :attr:`warp.TextureFilterMode.CLOSEST` or :attr:`warp.TextureFilterMode.LINEAR`.