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

Constants

const Int

Box filtering.

const Int

No filtering.

const Int

Box filtering.

const Int

No filtering.

const Int

The edge of the texture extends to infinity.

const Int

The texture infinitely repeats and mirrors in the wrap direction.

const Int

The texture infinitely repeats in the wrap direction.

Public constructors

TextureSampler(
    minificationFilter: Int,
    magnificationFilter: Int,
    wrapModeHorizontal: Int,
    wrapModeVertical: Int,
    wrapModeDepth: Int
)

Defines the sampling behavior for a texture.

Public properties

Int

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

Int

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

Int

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

Int

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

Int

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

Constants

MAGNIFICATION_FILTER_LINEAR

const val MAGNIFICATION_FILTER_LINEAR = 1: Int

Box filtering. Weighted average of 4 neighbors is used.

MAGNIFICATION_FILTER_NEAREST

const val MAGNIFICATION_FILTER_NEAREST = 0: Int

No filtering. Nearest neighbor is used.

MINIFICATION_FILTER_LINEAR

const val MINIFICATION_FILTER_LINEAR = 1: Int

Box filtering. Weighted average of 4 neighbors is used.

MINIFICATION_FILTER_NEAREST

const val MINIFICATION_FILTER_NEAREST = 0: Int

No filtering. Nearest neighbor is used.

WRAP_MODE_CLAMP_TO_EDGE

const val WRAP_MODE_CLAMP_TO_EDGE = 0: Int

The edge of the texture extends to infinity.

WRAP_MODE_MIRRORED_REPEAT

const val WRAP_MODE_MIRRORED_REPEAT = 2: Int

The texture infinitely repeats and mirrors in the wrap direction.

WRAP_MODE_REPEAT

const val WRAP_MODE_REPEAT = 1: Int

The texture infinitely repeats in the wrap direction.

Public constructors

TextureSampler

Added in 1.0.0-alpha07
TextureSampler(
    minificationFilter: Int = MINIFICATION_FILTER_LINEAR,
    magnificationFilter: Int = MAGNIFICATION_FILTER_LINEAR,
    wrapModeHorizontal: Int = WRAP_MODE_REPEAT,
    wrapModeVertical: Int = WRAP_MODE_REPEAT,
    wrapModeDepth: Int = WRAP_MODE_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: Int = MINIFICATION_FILTER_LINEAR

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

magnificationFilter: Int = MAGNIFICATION_FILTER_LINEAR

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

wrapModeHorizontal: Int = WRAP_MODE_REPEAT

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

wrapModeVertical: Int = WRAP_MODE_REPEAT

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

wrapModeDepth: Int = WRAP_MODE_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-alpha07
val magnificationFilterInt

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

minificationFilter

Added in 1.0.0-alpha07
val minificationFilterInt

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

wrapModeDepth

Added in 1.0.0-alpha07
val wrapModeDepthInt

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

wrapModeHorizontal

Added in 1.0.0-alpha07
val wrapModeHorizontalInt

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

wrapModeVertical

Added in 1.0.0-alpha07
val wrapModeVerticalInt

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