Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    SamplerStateDescription Struct

    Namespace: Stride.Graphics
    Assembly: Stride.dll

    Describes a sampler state.

    [DataContract]
    public struct SamplerStateDescription : IEquatable<SamplerStateDescription>
    Name Description
    Constructors
    SamplerStateDescription(TextureFilter, TextureAddressMode)

    Initializes a new instance of the SamplerStateDescription class.

    Fields
    AddressU

    Gets or sets method to use for resolving a u texture coordinate that is outside the 0 to 1 range (see TextureAddressMode).

    AddressV

    Gets or sets method to use for resolving a v texture coordinate that is outside the 0 to 1 range.

    AddressW

    Gets or sets method to use for resolving a w texture coordinate that is outside the 0 to 1 range.

    BorderColor

    Gets or sets border color to use if Border is specified for AddressU, AddressV, or AddressW. Range must be between 0.0 and 1.0 inclusive.

    CompareFunction

    Gets or sets a function that compares sampled data against existing sampled data. The function options are listed in CompareFunction.

    Filter

    Gets or sets filtering method to use when sampling a texture (see TextureFilter).

    MaxAnisotropy

    Gets or sets clamping value used if Anisotropy or ComparisonAnisotropy is specified in Filter. Valid values are between 1 and 16.

    MaxMipLevel

    Gets or sets 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. This value must be greater than or equal to MinLOD. To have no upper limit on LOD set this to a large value such as D3D11_FLOAT32_MAX.

    MinMipLevel

    Gets or sets 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.

    MipMapLevelOfDetailBias

    Gets or sets offset from the calculated mipmap level. For example, if Direct3D calculates that a texture should be sampled at mipmap level 3 and MipLODBias is 2, then the texture will be sampled at mipmap level 5.

    Properties
    Default

    Gets default values for this instance.

    Methods
    Equals(SamplerStateDescription)
    Equals(Object)
    GetHashCode()
    | Improve this Doc View Source

    Constructors


    SamplerStateDescription(TextureFilter, TextureAddressMode)

    Initializes a new instance of the SamplerStateDescription class.

    public SamplerStateDescription(TextureFilter filter, TextureAddressMode addressMode)
    Parameters
    Type Name Description
    TextureFilter filter

    The filter.

    TextureAddressMode addressMode

    The address mode.

    | Improve this Doc View Source

    Fields


    AddressU

    Gets or sets method to use for resolving a u texture coordinate that is outside the 0 to 1 range (see TextureAddressMode).

    public TextureAddressMode AddressU
    Field Value
    Type Description
    TextureAddressMode

    AddressV

    Gets or sets method to use for resolving a v texture coordinate that is outside the 0 to 1 range.

    public TextureAddressMode AddressV
    Field Value
    Type Description
    TextureAddressMode

    AddressW

    Gets or sets method to use for resolving a w texture coordinate that is outside the 0 to 1 range.

    public TextureAddressMode AddressW
    Field Value
    Type Description
    TextureAddressMode

    BorderColor

    Gets or sets border color to use if Border is specified for AddressU, AddressV, or AddressW. Range must be between 0.0 and 1.0 inclusive.

    public Color4 BorderColor
    Field Value
    Type Description
    Color4

    CompareFunction

    Gets or sets a function that compares sampled data against existing sampled data. The function options are listed in CompareFunction.

    public CompareFunction CompareFunction
    Field Value
    Type Description
    CompareFunction

    Filter

    Gets or sets filtering method to use when sampling a texture (see TextureFilter).

    public TextureFilter Filter
    Field Value
    Type Description
    TextureFilter

    MaxAnisotropy

    Gets or sets clamping value used if Anisotropy or ComparisonAnisotropy is specified in Filter. Valid values are between 1 and 16.

    public int MaxAnisotropy
    Field Value
    Type Description
    System.Int32

    MaxMipLevel

    Gets or sets 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. This value must be greater than or equal to MinLOD. To have no upper limit on LOD set this to a large value such as D3D11_FLOAT32_MAX.

    public float MaxMipLevel
    Field Value
    Type Description
    System.Single

    MinMipLevel

    Gets or sets 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.

    public float MinMipLevel
    Field Value
    Type Description
    System.Single

    MipMapLevelOfDetailBias

    Gets or sets offset from the calculated mipmap level. For example, if Direct3D calculates that a texture should be sampled at mipmap level 3 and MipLODBias is 2, then the texture will be sampled at mipmap level 5.

    public float MipMapLevelOfDetailBias
    Field Value
    Type Description
    System.Single
    | Improve this Doc View Source

    Properties


    Default

    Gets default values for this instance.

    public static readonly SamplerStateDescription Default { get; }
    Property Value
    Type Description
    SamplerStateDescription
    | Improve this Doc View Source

    Methods


    Equals(SamplerStateDescription)

    public bool Equals(SamplerStateDescription other)
    Parameters
    Type Name Description
    SamplerStateDescription other
    Returns
    Type Description
    System.Boolean

    Equals(Object)

    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()

    Inherited Members

    System.ValueType.ToString()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation