8 #include "core/mipmaps_compute.hpp"
9 #include "core/convert_func.hpp"
16 template <
typename T, precision P = defaultp>
20 typedef typename detail::interpolate<T>::type interpolate_type;
24 typedef typename texture_type::size_type size_type;
25 typedef typename texture_type::extent_type extent_type;
26 typedef interpolate_type level_type;
27 typedef tvec3<interpolate_type, P> normalized_type;
28 typedef tvec4<T, P> texel_type;
30 sampler3d(texture_type
const& Texture,
wrap Wrap,
filter Mip = FILTER_NEAREST,
filter Min = FILTER_NEAREST, texel_type
const& BorderColor = texel_type(0, 0, 0, 1));
36 texel_type
texel_fetch(extent_type
const& TexelCoord, size_type
const& Level)
const;
39 void texel_write(extent_type
const& TexelCoord, size_type
const & Level, texel_type
const& Texel);
42 void clear(texel_type
const& Texel);
45 texel_type
texture_lod(normalized_type
const& SampleCoord, level_type Level)
const;
54 typedef typename detail::convert<texture_type, T, P>::func convert_type;
55 typedef typename detail::convert<texture_type, T, P>::fetchFunc fetch_type;
56 typedef typename detail::convert<texture_type, T, P>::writeFunc write_type;
57 typedef typename detail::filterBase<detail::DIMENSION_3D, texture_type, interpolate_type, normalized_type, fetch_type, texel_type>::filterFunc filter_type;
61 texel_type BorderColor;
71 #include "./core/sampler3d.inl"
filter
Texture filtring modes.
void texel_write(extent_type const &TexelCoord, size_type const &Level, texel_type const &Texel)
Write a texel in the sampler texture.
texel_type texture_lod(normalized_type const &SampleCoord, level_type Level) const
Sample the sampler texture at a specific level.
texel_type texel_fetch(extent_type const &TexelCoord, size_type const &Level) const
Fetch a texel from the sampler texture.
void generate_mipmaps(filter Minification)
Generate all the mipmaps of the sampler texture from the texture base level.
Namespace where all the classes and functions provided by GLI are exposed.
wrap
Texture coordinate wrapping mode.
Include to use wrap modes and the sampler base class.
Include to use 3d textures.
texture_type const & operator()() const
Access the sampler texture object.
void clear(texel_type const &Texel)
Clear the sampler texture with a uniform texel.