9#ifndef AVARA3D_VISUAL_MATERIAL_SAMPLER_H
10#define AVARA3D_VISUAL_MATERIAL_SAMPLER_H
15#include "a3d/util/Bitmask.h"
33 NearestMipmapNearest = 0x2700,
34 LinearMipmapNearest = 0x2701,
35 NearestMipmapLinear = 0x2702,
36 LinearMipmapLinear = 0x2703
43 MirroredRepeat = 0x8370,
104 enum class DirtyMask : uint32_t {
106 MinificationFilter = 1 << 0,
107 MagnificationFilter = 1 << 1,
108 MaxAnisotropy = 1 << 2,
117 SamplerId id() const noexcept;
119 DirtyMask dirtyMask() const;
120 void dirtyMask(DirtyMask mask);
128 float _maxAnisotropy;
133 DirtyMask _dirtyMask;
136 namespace util::bitmask {
139 struct enable_ops<
Sampler::DirtyMask> : std::true_type {};
Describes filtering, anisotropy, and coordinate wrapping for a Texture.
void wrapT(WrapMode mode)
Sets the T-coordinate wrap mode.
void wrapR(WrapMode mode)
Sets the R-coordinate wrap mode used by cubemap sampling.
void magnificationFilter(FilterMode mode)
Sets the magnification filter; magnification supports Nearest or Linear filtering.
WrapMode wrapT() const
Returns the T-coordinate wrap mode.
void wrapS(WrapMode mode)
Sets the S-coordinate wrap mode.
void maxAnisotropy(float max)
Sets the requested maximum anisotropy.
WrapMode
Selects how texture coordinates outside the image range are wrapped.
WrapMode wrapS() const
Returns the S-coordinate wrap mode.
WrapMode wrapR() const
Returns the R-coordinate wrap mode used by cubemap sampling.
FilterMode minificationFilter() const
Returns the texture minification filter.
float maxAnisotropy() const
Returns the requested maximum anisotropy.
FilterMode magnificationFilter() const
Returns the texture magnification filter.
Sampler()
Creates a Sampler with default filtering, anisotropy, and wrapping state.
FilterMode
Selects texture filtering and optional mipmap interpolation.
void minificationFilter(FilterMode mode)
Sets the texture minification filter.