TextureSampler


public final 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

static final int

Box filtering.

static final int

No filtering.

static final int

Box filtering.

static final int

No filtering.

static final int

The edge of the texture extends to infinity.

static final int

The texture infinitely repeats and mirrors in the wrap direction.

static final int

The texture infinitely repeats in the wrap direction.

Public constructors

TextureSampler(
    int minificationFilter,
    int magnificationFilter,
    int wrapModeHorizontal,
    int wrapModeVertical,
    int wrapModeDepth
)

Defines the sampling behavior for a texture.

Public methods

final int

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

final int

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

final int

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

final int

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

final int

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

Constants

MAGNIFICATION_FILTER_LINEAR

public static final int MAGNIFICATION_FILTER_LINEAR = 1

Box filtering. Weighted average of 4 neighbors is used.

MAGNIFICATION_FILTER_NEAREST

public static final int MAGNIFICATION_FILTER_NEAREST = 0

No filtering. Nearest neighbor is used.

MINIFICATION_FILTER_LINEAR

public static final int MINIFICATION_FILTER_LINEAR = 1

Box filtering. Weighted average of 4 neighbors is used.

MINIFICATION_FILTER_NEAREST

public static final int MINIFICATION_FILTER_NEAREST = 0

No filtering. Nearest neighbor is used.

WRAP_MODE_CLAMP_TO_EDGE

public static final int WRAP_MODE_CLAMP_TO_EDGE = 0

The edge of the texture extends to infinity.

WRAP_MODE_MIRRORED_REPEAT

public static final int WRAP_MODE_MIRRORED_REPEAT = 2

The texture infinitely repeats and mirrors in the wrap direction.

WRAP_MODE_REPEAT

public static final int WRAP_MODE_REPEAT = 1

The texture infinitely repeats in the wrap direction.

Public constructors

TextureSampler

Added in 1.0.0-alpha07
public TextureSampler(
    int minificationFilter,
    int magnificationFilter,
    int wrapModeHorizontal,
    int wrapModeVertical,
    int wrapModeDepth
)

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
int minificationFilter

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

int magnificationFilter

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

int wrapModeHorizontal

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

int wrapModeVertical

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

int wrapModeDepth

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

Public methods

getMagnificationFilter

Added in 1.0.0-alpha07
public final int getMagnificationFilter()

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

getMinificationFilter

Added in 1.0.0-alpha07
public final int getMinificationFilter()

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

getWrapModeDepth

Added in 1.0.0-alpha07
public final int getWrapModeDepth()

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

getWrapModeHorizontal

Added in 1.0.0-alpha07
public final int getWrapModeHorizontal()

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

getWrapModeVertical

Added in 1.0.0-alpha07
public final int getWrapModeVertical()

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