Struct SamplerDescription
Describes a Sampler, for creation using a ResourceFactory.
Implements
Inherited Members
Namespace: Veldrid
Assembly: cs.temp.dll.dll
Syntax
public struct SamplerDescription : IEquatable<SamplerDescription>
Constructors
SamplerDescription(SamplerAddressMode, SamplerAddressMode, SamplerAddressMode, SamplerFilter, Nullable<ComparisonKind>, UInt32, UInt32, UInt32, Int32, SamplerBorderColor)
Constructs a new SamplerDescription.
Declaration
public SamplerDescription(SamplerAddressMode addressModeU, SamplerAddressMode addressModeV, SamplerAddressMode addressModeW, SamplerFilter filter, ComparisonKind? comparisonKind, uint maximumAnisotropy, uint minimumLod, uint maximumLod, int lodBias, SamplerBorderColor borderColor)
Parameters
Type | Name | Description |
---|---|---|
SamplerAddressMode | addressModeU | The SamplerAddressMode mode to use for the U (or R) coordinate. |
SamplerAddressMode | addressModeV | The SamplerAddressMode mode to use for the V (or S) coordinate. |
SamplerAddressMode | addressModeW | The SamplerAddressMode mode to use for the W (or T) coordinate. |
SamplerFilter | filter | The filter used when sampling. |
System.Nullable<ComparisonKind> | comparisonKind | An optional value controlling the kind of comparison to use when sampling. If null, comparison sampling is not used. |
System.UInt32 | maximumAnisotropy | The maximum anisotropy of the filter, when Anisotropic is used, or otherwise ignored. |
System.UInt32 | minimumLod | The minimum level of detail. |
System.UInt32 | maximumLod | The maximum level of detail. |
System.Int32 | lodBias | The level of detail bias. |
SamplerBorderColor | borderColor | The constant color that is sampled when Border is used, or otherwise ignored. |
Fields
AddressModeU
The SamplerAddressMode mode to use for the U (or S) coordinate.
Declaration
public SamplerAddressMode AddressModeU
Field Value
Type | Description |
---|---|
SamplerAddressMode |
AddressModeV
The SamplerAddressMode mode to use for the V (or T) coordinate.
Declaration
public SamplerAddressMode AddressModeV
Field Value
Type | Description |
---|---|
SamplerAddressMode |
AddressModeW
The SamplerAddressMode mode to use for the W (or R) coordinate.
Declaration
public SamplerAddressMode AddressModeW
Field Value
Type | Description |
---|---|
SamplerAddressMode |
Aniso4x
Describes a common 4x-anisotropic-filter sampler, with wrapping address mode. Settings: AddressModeU = SamplerAddressMode.Wrap AddressModeV = SamplerAddressMode.Wrap AddressModeW = SamplerAddressMode.Wrap Filter = SamplerFilter.Anisotropic LodBias = 0 MinimumLod = 0 MaximumLod = uint.MaxValue MaximumAnisotropy = 4
Declaration
public static readonly SamplerDescription Aniso4x
Field Value
Type | Description |
---|---|
SamplerDescription |
BorderColor
The constant color that is sampled when Border is used, or otherwise ignored.
Declaration
public SamplerBorderColor BorderColor
Field Value
Type | Description |
---|---|
SamplerBorderColor |
ComparisonKind
An optional value controlling the kind of comparison to use when sampling. If null, comparison sampling is not used.
Declaration
public ComparisonKind? ComparisonKind
Field Value
Type | Description |
---|---|
System.Nullable<ComparisonKind> |
Filter
The filter used when sampling.
Declaration
public SamplerFilter Filter
Field Value
Type | Description |
---|---|
SamplerFilter |
Linear
Describes a common linear-filter sampler, with wrapping address mode. Settings: AddressModeU = SamplerAddressMode.Wrap AddressModeV = SamplerAddressMode.Wrap AddressModeW = SamplerAddressMode.Wrap Filter = SamplerFilter.MinLinear_MagLinear_MipLinear LodBias = 0 MinimumLod = 0 MaximumLod = uint.MaxValue MaximumAnisotropy = 0
Declaration
public static readonly SamplerDescription Linear
Field Value
Type | Description |
---|---|
SamplerDescription |
LodBias
The level of detail bias.
Declaration
public int LodBias
Field Value
Type | Description |
---|---|
System.Int32 |
MaximumAnisotropy
The maximum anisotropy of the filter, when Anisotropic is used, or otherwise ignored.
Declaration
public uint MaximumAnisotropy
Field Value
Type | Description |
---|---|
System.UInt32 |
MaximumLod
The maximum level of detail.
Declaration
public uint MaximumLod
Field Value
Type | Description |
---|---|
System.UInt32 |
MinimumLod
The minimum level of detail.
Declaration
public uint MinimumLod
Field Value
Type | Description |
---|---|
System.UInt32 |
Point
Describes a common point-filter sampler, with wrapping address mode. Settings: AddressModeU = SamplerAddressMode.Wrap AddressModeV = SamplerAddressMode.Wrap AddressModeW = SamplerAddressMode.Wrap Filter = SamplerFilter.MinPoint_MagPoint_MipPoint LodBias = 0 MinimumLod = 0 MaximumLod = uint.MaxValue MaximumAnisotropy = 0
Declaration
public static readonly SamplerDescription Point
Field Value
Type | Description |
---|---|
SamplerDescription |
Methods
Equals(SamplerDescription)
Element-wise equality.
Declaration
public bool Equals(SamplerDescription other)
Parameters
Type | Name | Description |
---|---|---|
SamplerDescription | other | The instance to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | True if all elements are equal; false otherswise. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit signed integer that is the hash code for this instance. |