Template Class texture2d_tmpl_t¶
Defined in File texture2d.hpp
Inheritance Relationships¶
Base Type¶
public wt::bitmap::texture2d_t
(Class texture2d_t)
Class Documentation¶
-
template<texel TexelT, texture_filter_type_e texfilter, pixel_layout_e layout, colour_encoding_type_e colour_encoding_type>
class texture2d_tmpl_t : public wt::bitmap::texture2d_t¶ Texture filtering implementation.
Public Functions
-
inline texture2d_tmpl_t(texture2d_storage_t storage, texture2d_config_t config, colour_encoding_t colour_encoding)¶
-
texture2d_tmpl_t(texture2d_tmpl_t&&) noexcept = default¶
-
texture2d_tmpl_t(const texture2d_tmpl_t &o) noexcept = default¶
-
inline auto clamp_texel_native(vec_native_t v) const noexcept¶
-
inline virtual std::size_t component_bytes() const noexcept override¶
Returns the byte per pixel component.
-
inline virtual std::size_t bytes() const noexcept override¶
Returns the total size (in bytes) of the texture.
-
inline virtual texture_filter_type_e get_tex_filter() const noexcept override¶
Returns the requested texture filter.
-
inline vec_native_t texel_native(vec2i32_t coord) const noexcept¶
Access a single texel at an image coordinate. Returns the texel in the image’s native pixel layout. Does not clamp the returned value (ignores
config.texel_clamp_mode
).
-
inline virtual vec4_t texel(vec2i32_t coord) const noexcept override¶
Access a single texel at an image coordinate. Returns the texel in RGBA layout. Does not clamp the returned value (ignores
config.texel_clamp_mode
).
-
inline vec_native_t filter_native(vec2_t uv, const vec2_t dudp, const vec2_t dvdp) const noexcept¶
Filters the texture.
- Parameters:
uv – ∈[0,1]² uv coordinates
dudp – partial derivatives of u w.r.t. sampling area
dvdp – partial derivatives of v w.r.t. sampling area
-
inline texture2d_tmpl_t(texture2d_storage_t storage, texture2d_config_t config, colour_encoding_t colour_encoding)¶