Samplers
Enums
-
namespace d3d
Enums
-
enum class MipMapMode : uint32_t
MipMapMode enum class.
Values:
-
enumerator Default
[DEPRECATED] driver default
-
enumerator Disabled
[DEPRECATED] no mipmapping
-
enumerator Point
point mipmapping
-
enumerator Linear
linear mipmapping
-
enumerator Default
-
enum class FilterMode : uint32_t
FilterMode enum class.
Values:
-
enumerator Default
[DEPRECATED] driver default
-
enumerator Disabled
[DEPRECATED]
-
enumerator Point
point sampling
-
enumerator Linear
linear sampling
-
enumerator Best
[DEPRECATED] anisotropic and similar, if available
-
enumerator Compare
point comparasion for using in pcf
-
enumerator Default
-
enum class AddressMode : uint32_t
AddressMode enum class.
Values:
-
enumerator Wrap
Repeats the texture when texture coordinates are outside [0, 1].
-
enumerator Mirror
Mirrors the texture when texture coordinates are outside [0, 1].
-
enumerator Clamp
Clamps texture coordinates to [0, 1].
-
enumerator Border
Uses the border color when texture coordinates are outside [0, 1].
-
enumerator MirrorOnce
Similar to Mirror and Clamp. Takes the absolute value of the texture coordinate (thus, mirroring around 0), and then clamps to the maximum value. The most common usage is for volume textures, where support for the full MirrorOnce texture-addressing mode is not necessary, but the data is symmetrical around the one axis.
-
enumerator Wrap
Functions
-
SamplerHandle request_sampler(const SamplerInfo &sampler_info)
Request a sampler handle with the given sampler info.
Creates a sampler, when necessary. Identical infos should yield identical handles. This call is thread-safe and does not require external synchronization.
- Parameters:
sampler_info – The information needed to create the sampler
- Returns:
SamplerHandle The handle to the sampler
-
void set_sampler(unsigned shader_stage, unsigned slot, SamplerHandle sampler)
Binds given sampler to the slot.
This call is not thread-safe, requires global gpu lock to be held
- Parameters:
shader_stage – The shader stage to bind the sampler to. One of STAGE_XXX enum.
slot – The slot to bind the sampler to
sampler – The handle to the sampler to be bound
-
struct BorderColor
BorderColor struct.
Public Types
-
enum class Color : UnderlyingT
Values:
-
enumerator TransparentBlack
Transparent black color.
-
enumerator OpaqueBlack
Opaque black color.
-
enumerator OpaqueWhite
Opaque white color.
-
enumerator TransparentBlack
-
using UnderlyingT = uint32_t
Public Functions
-
inline BorderColor(Color color = Color::TransparentBlack)
-
inline operator E3DCOLOR() const
-
inline operator UnderlyingT() const
Public Members
-
enum d3d::BorderColor::Color color
-
enum class Color : UnderlyingT
-
struct SamplerInfo
SamplerInfo struct.
This struct contains the information needed to create a sampler
Public Functions
-
inline bool operator==(const SamplerInfo &rhs) const
-
inline bool operator!=(const SamplerInfo &rhs) const
-
inline bool operator<(const SamplerInfo &rhs) const
Public Members
-
MipMapMode mip_map_mode = MipMapMode::Default
MipMapMode.
-
FilterMode filter_mode = FilterMode::Default
FilterMode.
-
AddressMode address_mode_u = AddressMode::Wrap
AddressMode for U coordinate.
-
AddressMode address_mode_v = AddressMode::Wrap
AddressMode for V coordinate.
-
AddressMode address_mode_w = AddressMode::Wrap
AddressMode for W coordinate.
-
BorderColor border_color
Border color.
-
float anisotropic_max = 1.f
Max anisotropic value. Only positive power of two values <= 16 are valid.
-
float mip_map_bias = 0.f
MipMap bias.
-
inline bool operator==(const SamplerInfo &rhs) const
-
enum class MipMapMode : uint32_t