Class Sampler
Texture sampler properties for filtering and wrapping modes.
Inherited Members
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: |
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. |