{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class Sampler | Unity glTFast | 6.0.1
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Sampler

    Texture sampler properties for filtering and wrapping modes.

    Inheritance
    object
    NamedObject
    Sampler
    Sampler
    Inherited Members
    NamedObject.name
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: GLTFast.Schema
    Assembly: solution.dll
    Syntax
    [Serializable]
    public class Sampler : NamedObject

    Constructors

    Name Description
    Sampler()

    Parameter-less constructor

    Sampler(FilterMode, TextureWrapMode, TextureWrapMode)

    Constructs a Sampler with filter and wrap modes.

    Fields

    Name Description
    magFilter

    Magnification filter. Valid values correspond to WebGL enums: 9728 (NEAREST) and 9729 (LINEAR).

    minFilter

    Minification filter. All valid values correspond to WebGL enums.

    wrapS

    s wrapping mode. All valid values correspond to WebGL enums.

    wrapT

    t wrapping mode. All valid values correspond to WebGL enums.

    Properties

    Name Description
    FilterMode

    Unity filter mode, derived from glTF's minFilter and magFilter.

    WrapU

    Unity texture wrap mode (horizontal), derived from glTF's wrapS value.

    WrapV

    Unity texture wrap mode (vertical), derived from glTF's wrapT value.

    Methods

    Name Description
    Apply(Texture2D, MinFilterMode, MagFilterMode)

    Applies the Sampler's settings to a Unity texture.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)