4 using System.Runtime.InteropServices;
5 using SiliconStudio.Core;
6 using SiliconStudio.Core.Mathematics;
7 using SiliconStudio.Core.Serialization;
9 namespace SiliconStudio.
Paradox.Graphics
15 [StructLayout(LayoutKind.Sequential)]
27 AddressU = AddressV = AddressW = addressMode;
96 return Filter == other.Filter && AddressU == other.AddressU && AddressV == other.AddressV && AddressW == other.AddressW && MipMapLevelOfDetailBias.Equals(other.MipMapLevelOfDetailBias) && MaxAnisotropy == other.
MaxAnisotropy &&
CompareFunction == other.
CompareFunction && BorderColor.Equals(other.
BorderColor) && MinMipLevel.Equals(other.MinMipLevel) && MaxMipLevel.Equals(other.
MaxMipLevel);
99 public override bool Equals(
object obj)
101 if (ReferenceEquals(null, obj))
return false;
109 int hashCode = (int)Filter;
110 hashCode = (hashCode * 397) ^ (
int)AddressU;
111 hashCode = (hashCode * 397) ^ (
int)AddressV;
112 hashCode = (hashCode * 397) ^ (
int)AddressW;
113 hashCode = (hashCode * 397) ^ MipMapLevelOfDetailBias.GetHashCode();
114 hashCode = (hashCode * 397) ^ MaxAnisotropy;
116 hashCode = (hashCode * 397) ^ BorderColor.GetHashCode();
117 hashCode = (hashCode * 397) ^ MinMipLevel.GetHashCode();
118 hashCode = (hashCode * 397) ^ MaxMipLevel.GetHashCode();
123 private void SetDefaults()
125 Filter = TextureFilter.Linear;
126 AddressU = TextureAddressMode.Clamp;
127 AddressV = TextureAddressMode.Clamp;
128 AddressW = TextureAddressMode.Clamp;
129 BorderColor =
new Color4();
131 MinMipLevel = -float.MaxValue;
132 MaxMipLevel = float.MaxValue;
133 MipMapLevelOfDetailBias = 0.0f;
TextureAddressMode AddressW
Gets or sets method to use for resolving a w texture coordinate that is outside the 0 to 1 range...
Color4 BorderColor
Gets or sets border color to use if TextureAddressMode.Border is specified for AddressU, AddressV, or AddressW. Range must be between 0.0 and 1.0 inclusive.
float MinMipLevel
Gets or sets lower end of the mipmap range to clamp access to, where 0 is the largest and most detail...
Describes a sampler state.
TextureFilter Filter
Gets or sets filtering method to use when sampling a texture (see TextureFilter). ...
SamplerStateDescription(TextureFilter filter, TextureAddressMode addressMode)
Initializes a new instance of the SamplerStateDescription class.
TextureAddressMode
Identify a technique for resolving texture coordinates that are outside of the boundaries of a textur...
TextureFilter
Filtering options during texture sampling.
TextureAddressMode AddressV
Gets or sets method to use for resolving a v texture coordinate that is outside the 0 to 1 range...
Represents a color in the form of rgba.
Use the default mode depending on the type of the field/property.
CompareFunction CompareFunction
Gets or sets a function that compares sampled data against existing sampled data. The function option...
bool Equals(SamplerStateDescription other)
CompareFunction
Comparison options.
override bool Equals(object obj)
TextureAddressMode AddressU
Gets or sets method to use for resolving a u texture coordinate that is outside the 0 to 1 range (see...
override int GetHashCode()
float MaxMipLevel
Gets or sets upper end of the mipmap range to clamp access to, where 0 is the largest and most detail...
int MaxAnisotropy
Gets or sets clamping value used if Anisotropy or ComparisonAnisotropy is specified in Filter...
float MipMapLevelOfDetailBias
Gets or sets offset from the calculated mipmap level. For example, if Direct3D calculates that a text...