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, ReadOnlySpan<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, ReadOnlySpan<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. |
| ReadOnlySpan<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. |
D3D11SamplerDesc(D3D11Filter, D3D11TextureAddressMode, D3D11TextureAddressMode, D3D11TextureAddressMode, float, uint, D3D11ComparisonFunction, float, float, float, 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 borderColorR, float borderColorG, float borderColorB, float borderColorA, 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 | borderColorR | The border color red to use if Border is specified for |
| float | borderColorG | The border color green to use if Border is specified for |
| float | borderColorB | The border color blue to use if Border is specified for |
| float | borderColorA | The border color alpha 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. |
D3D11SamplerDesc(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 |
MipLodBias
Gets or sets the offset from the calculated mipmap level.
Declaration
public float MipLodBias { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
| Edit this page View SourceEquals(D3D11SamplerDesc)
Declaration
public readonly bool Equals(D3D11SamplerDesc other)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11SamplerDesc | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
Declaration
public override readonly bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
| Edit this page View SourceGetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
| Edit this page View SourceNativeReadFrom(nint)
Declaration
public static D3D11SamplerDesc NativeReadFrom(nint buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer |
Returns
| Type | Description |
|---|---|
| D3D11SamplerDesc |
NativeReadFrom(nint, Span<D3D11SamplerDesc>)
Declaration
public static void NativeReadFrom(nint buffer, Span<D3D11SamplerDesc> objects)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| Span<D3D11SamplerDesc> | objects |
NativeRequiredSize()
Declaration
public static int NativeRequiredSize()
Returns
| Type | Description |
|---|---|
| int |
NativeRequiredSize(int)
Declaration
public static int NativeRequiredSize(int count)
Parameters
| Type | Name | Description |
|---|---|---|
| int | count |
Returns
| Type | Description |
|---|---|
| int |
NativeWriteTo(nint, in D3D11SamplerDesc)
Declaration
public static void NativeWriteTo(nint buffer, in D3D11SamplerDesc obj)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| D3D11SamplerDesc | obj |
NativeWriteTo(nint, ReadOnlySpan<D3D11SamplerDesc>)
Declaration
public static void NativeWriteTo(nint buffer, ReadOnlySpan<D3D11SamplerDesc> objects)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| ReadOnlySpan<D3D11SamplerDesc> | objects |
Operators
| Edit this page View Sourceoperator ==(D3D11SamplerDesc, D3D11SamplerDesc)
Declaration
public static bool operator ==(D3D11SamplerDesc left, D3D11SamplerDesc right)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11SamplerDesc | left | |
| D3D11SamplerDesc | right |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(D3D11SamplerDesc, D3D11SamplerDesc)
Declaration
public static bool operator !=(D3D11SamplerDesc left, D3D11SamplerDesc right)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11SamplerDesc | left | |
| D3D11SamplerDesc | right |
Returns
| Type | Description |
|---|---|
| bool |