Struct D3D11SamplerDesc
Describes a sampler state.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.D3D11
Assembly: JeremyAnsel.DirectX.D3D11.dll
Syntax
public struct D3D11SamplerDesc : IEquatable<D3D11SamplerDesc>
Constructors
| Edit this page View SourceD3D11SamplerDesc(D3D11Filter, D3D11TextureAddressMode, D3D11TextureAddressMode, D3D11TextureAddressMode, float, uint, D3D11ComparisonFunction, float[], float, float)
Initializes a new instance of the D3D11SamplerDesc struct.
Declaration
public D3D11SamplerDesc(D3D11Filter filter, D3D11TextureAddressMode addressU, D3D11TextureAddressMode addressV, D3D11TextureAddressMode addressW, float mipLodBias, uint maxAnisotropy, D3D11ComparisonFunction comparisonFunction, float[] borderColor, float minLod, float maxLod)
Parameters
Type | Name | Description |
---|---|---|
D3D11Filter | filter | The filtering method to use when sampling a texture. |
D3D11TextureAddressMode | addressU | The method to use for resolving a u texture coordinate that is outside the 0 to 1 range. |
D3D11TextureAddressMode | addressV | The method to use for resolving a v texture coordinate that is outside the 0 to 1 range. |
D3D11TextureAddressMode | addressW | The method to use for resolving a w texture coordinate that is outside the 0 to 1 range. |
float | mipLodBias | The offset from the calculated mipmap level. |
uint | maxAnisotropy | The clamping value used if Anisotropic or ComparisonAnisotropic is specified in |
D3D11ComparisonFunction | comparisonFunction | A function that compares sampled data against existing sampled data. |
float[] | borderColor | The border color to use if Border is specified for |
float | minLod | The lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. |
float | maxLod | The upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. |
Properties
| Edit this page View SourceAddressU
Gets or sets the method to use for resolving a u texture coordinate that is outside the 0 to 1 range.
Declaration
public D3D11TextureAddressMode AddressU { get; set; }
Property Value
Type | Description |
---|---|
D3D11TextureAddressMode |
AddressV
Gets or sets the method to use for resolving a v texture coordinate that is outside the 0 to 1 range.
Declaration
public D3D11TextureAddressMode AddressV { get; set; }
Property Value
Type | Description |
---|---|
D3D11TextureAddressMode |
AddressW
Gets or sets the method to use for resolving a w texture coordinate that is outside the 0 to 1 range.
Declaration
public D3D11TextureAddressMode AddressW { get; set; }
Property Value
Type | Description |
---|---|
D3D11TextureAddressMode |
BorderColorA
Gets or sets the border color alpha component to use if Border is specified for AddressU
, AddressV
, or AddressW
.
Declaration
public float BorderColorA { get; set; }
Property Value
Type | Description |
---|---|
float |
BorderColorB
Gets or sets the border color blue component to use if Border is specified for AddressU
, AddressV
, or AddressW
.
Declaration
public float BorderColorB { get; set; }
Property Value
Type | Description |
---|---|
float |
BorderColorG
Gets or sets the border color green component to use if Border is specified for AddressU
, AddressV
, or AddressW
.
Declaration
public float BorderColorG { get; set; }
Property Value
Type | Description |
---|---|
float |
BorderColorR
Gets or sets the border color red component to use if Border is specified for AddressU
, AddressV
, or AddressW
.
Declaration
public float BorderColorR { get; set; }
Property Value
Type | Description |
---|---|
float |
ComparisonFunction
Gets or sets a function that compares sampled data against existing sampled data.
Declaration
public D3D11ComparisonFunction ComparisonFunction { get; set; }
Property Value
Type | Description |
---|---|
D3D11ComparisonFunction |
Default
Gets default sampler-state values.
Declaration
public static D3D11SamplerDesc Default { get; }
Property Value
Type | Description |
---|---|
D3D11SamplerDesc |
Filter
Gets or sets the filtering method to use when sampling a texture.
Declaration
public D3D11Filter Filter { get; set; }
Property Value
Type | Description |
---|---|
D3D11Filter |
MaxAnisotropy
Gets or sets the clamping value used if Anisotropic or ComparisonAnisotropic is specified in Filter
.
Declaration
public uint MaxAnisotropy { get; set; }
Property Value
Type | Description |
---|---|
uint |
MaxLod
Gets or sets the upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.
Declaration
public float MaxLod { get; set; }
Property Value
Type | Description |
---|---|
float |
MinLod
Gets or sets the lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.
Declaration
public float MinLod { get; set; }
Property Value
Type | Description |
---|---|
float |
MipLoadBias
Gets or sets the offset from the calculated mipmap level.
Declaration
public float MipLoadBias { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceEquals(D3D11SamplerDesc)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(D3D11SamplerDesc other)
Parameters
Type | Name | Description |
---|---|---|
D3D11SamplerDesc | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
Operators
| Edit this page View Sourceoperator ==(D3D11SamplerDesc, D3D11SamplerDesc)
Compares two D3D11SamplerDesc objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(D3D11SamplerDesc left, D3D11SamplerDesc right)
Parameters
Type | Name | Description |
---|---|---|
D3D11SamplerDesc | left | The left D3D11SamplerDesc to compare. |
D3D11SamplerDesc | right | The right D3D11SamplerDesc to compare. |
Returns
Type | Description |
---|---|
bool |
operator !=(D3D11SamplerDesc, D3D11SamplerDesc)
Compares two D3D11SamplerDesc objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(D3D11SamplerDesc left, D3D11SamplerDesc right)
Parameters
Type | Name | Description |
---|---|---|
D3D11SamplerDesc | left | The left D3D11SamplerDesc to compare. |
D3D11SamplerDesc | right | The right D3D11SamplerDesc to compare. |
Returns
Type | Description |
---|---|
bool |