Ritchie's Abstractions 0.2
Platform abstractions that make Toolbox work
Loading...
Searching...
No Matches
SamplerState Struct Reference

Structure containing settings for a texture sampler. More...

Inheritance diagram for SamplerState:

Public Member Functions

override bool Equals ([NotNullWhen(true)] object? obj)
 
override int GetHashCode ()
 
bool Equals (SamplerState other)
 

Static Public Member Functions

static bool operator== (SamplerState a, SamplerState b)
 Checks if two SamplerState values are equal.
 
static bool operator!= (SamplerState a, SamplerState b)
 Checks if two SamplerState values are not equal.
 

Public Attributes

TextureFilter TextureFilter
 Defines the filtering applied to the texture when sampling it.
 

Static Public Attributes

static readonly SamplerState PointClamp = new() { TextureFilter = TextureFilter.PointClamp }
 When sampling a texture, always sample the nearest pixel.
 
static readonly SamplerState PointWrap = new() { TextureFilter = TextureFilter.PointWrap }
 When sampling a texture, wrap coordinates within the texture's bounds and then sample the nearest pixel.
 
static readonly SamplerState LinearClamp = new() { TextureFilter = TextureFilter.LinearClamp }
 When sampling a texture, clamp the coordinates within the bounds of the texture. If the coordinates don't land exactly on a pixel, use linear interpolation based on nearby pixels.
 
static readonly SamplerState LinearWrap = new() { TextureFilter = TextureFilter.LinearWrap }
 When sampling a texture, wrap the coordinates within the bounds of the texture. If the coordinates don't land exactly on a pixel, use linear interpolation based on nearby pixels.
 

Detailed Description

Structure containing settings for a texture sampler.

Member Function Documentation

◆ operator!=()

static bool operator!= ( SamplerState a,
SamplerState b )
inlinestatic

Checks if two SamplerState values are not equal.

Parameters
aThe left side of the operation
bThe right side of the operation
Returns
False if equal, true otherwise.

◆ operator==()

static bool operator== ( SamplerState a,
SamplerState b )
inlinestatic

Checks if two SamplerState values are equal.

Parameters
aThe left side of the operation
bThe right side of the operation
Returns
True if equal, false otherwise.

The documentation for this struct was generated from the following file: