TextureSampler


class TextureSampler


Defines the sampling behavior for a texture.

The fields of this sampler are based on the public Filament TextureSampler class but may diverge over time.

Summary

Nested types

Defines the constants for texture magnification filters.

Defines the constants for texture minification filters.

Defines the constants for texture wrap modes.

Public constructors

TextureSampler(
    minificationFilter: TextureSampler.MinificationFilter,
    magnificationFilter: TextureSampler.MagnificationFilter,
    wrapModeHorizontal: TextureSampler.WrapMode,
    wrapModeVertical: TextureSampler.WrapMode,
    wrapModeDepth: TextureSampler.WrapMode
)

Defines the sampling behavior for a texture.

Public properties

TextureSampler.MagnificationFilter

an Int which describes how neighboring texels are sampled when the rendered size is larger than the texture.

TextureSampler.MinificationFilter

an Int which describes how neighboring texels are sampled when the rendered size is smaller than the texture.

TextureSampler.WrapMode

an Int which describes how texture coordinates outside the 0-1 range are handled along the depth axis.

TextureSampler.WrapMode

an Int which describes how texture coordinates outside the 0-1 range are handled along the horizontal axis.

TextureSampler.WrapMode

an Int which describes how texture coordinates outside the 0-1 range are handled along the vertical axis.

Public constructors

TextureSampler

Added in 1.0.0-alpha09
TextureSampler(
    minificationFilter: TextureSampler.MinificationFilter = MinificationFilter.LINEAR,
    magnificationFilter: TextureSampler.MagnificationFilter = MagnificationFilter.LINEAR,
    wrapModeHorizontal: TextureSampler.WrapMode = WrapMode.REPEAT,
    wrapModeVertical: TextureSampler.WrapMode = WrapMode.REPEAT,
    wrapModeDepth: TextureSampler.WrapMode = WrapMode.REPEAT
)

Defines the sampling behavior for a texture.

The fields of this sampler are based on the public Filament TextureSampler class but may diverge over time.

Parameters
minificationFilter: TextureSampler.MinificationFilter = MinificationFilter.LINEAR

an Int which describes how neighboring texels are sampled when the rendered size is smaller than the texture.

magnificationFilter: TextureSampler.MagnificationFilter = MagnificationFilter.LINEAR

an Int which describes how neighboring texels are sampled when the rendered size is larger than the texture.

wrapModeHorizontal: TextureSampler.WrapMode = WrapMode.REPEAT

an Int which describes how texture coordinates outside the 0-1 range are handled along the horizontal axis.

wrapModeVertical: TextureSampler.WrapMode = WrapMode.REPEAT

an Int which describes how texture coordinates outside the 0-1 range are handled along the vertical axis.

wrapModeDepth: TextureSampler.WrapMode = WrapMode.REPEAT

an Int which describes how texture coordinates outside the 0-1 range are handled along the depth axis.

Public properties

magnificationFilter

Added in 1.0.0-alpha09
val magnificationFilterTextureSampler.MagnificationFilter

an Int which describes how neighboring texels are sampled when the rendered size is larger than the texture.

minificationFilter

Added in 1.0.0-alpha09
val minificationFilterTextureSampler.MinificationFilter

an Int which describes how neighboring texels are sampled when the rendered size is smaller than the texture.

wrapModeDepth

Added in 1.0.0-alpha09
val wrapModeDepthTextureSampler.WrapMode

an Int which describes how texture coordinates outside the 0-1 range are handled along the depth axis.

wrapModeHorizontal

Added in 1.0.0-alpha09
val wrapModeHorizontalTextureSampler.WrapMode

an Int which describes how texture coordinates outside the 0-1 range are handled along the horizontal axis.

wrapModeVertical

Added in 1.0.0-alpha09
val wrapModeVerticalTextureSampler.WrapMode

an Int which describes how texture coordinates outside the 0-1 range are handled along the vertical axis.