TextureSampler
public final class TextureSampler
TextureSampler class used to define the way a texture gets sampled. The fields of this sampler are based on the public Filament TextureSampler class but may diverge over time. https://github.com/google/filament/blob/main/android/filament-android/src/main/java/com/google/android/filament/TextureSampler.java
Summary
Nested types |
---|
public static class TextureSampler.CompareFunc Comparison functions for the depth sampler. |
public static class TextureSampler.CompareMode Used for depth texture comparisons, determining how the sampled depth value is compared to a reference depth. |
public static class TextureSampler.MagFilter Specifies how the texture is sampled when it's magnified (appears larger than its original size). |
public static class TextureSampler.MinFilter Specifies how the texture is sampled when it's minified (appears smaller than its original size). |
public static class TextureSampler.WrapMode Defines how texture coordinates outside the range 0, 1 are handled. |
Public methods |
|
---|---|
static final @NonNull TextureSampler |
create( |
final int |
an |
final int |
an |
final int |
an |
final int |
an |
final int |
an |
final int |
an |
final int |
an |
final int |
an |
Public methods
create
public static final @NonNull TextureSampler create(
int minFilter,
int magFilter,
int wrapModeS,
int wrapModeT,
int wrapModeR,
int compareMode,
int compareFunc,
int anisotropyLog2
)
getAnisotropyLog2
public final int getAnisotropyLog2()
an Int
which controls the level of anisotropic filtering applied to the texture. Higher values mean more samples and better quality, at increased GPU cost.
getCompareFunc
public final int getCompareFunc()
an Int
which describes how depth texture sampling comparisons are evaluated. Must be one of CompareFunc
.
getCompareMode
public final int getCompareMode()
an Int
which describes how depth texture sampling comparisons are handled. Must be one of CompareMode
.
getMagFilter
public final int getMagFilter()
an Int
which describes how neighboring texels are sampled when the rendered size is larger than the texture. Must be one of MagFilter
.
getMinFilter
public final int getMinFilter()
an Int
which describes how neighboring texels are sampled when the rendered size is smaller than the texture. Must be one of MinFilter
.
getWrapModeR
public final int getWrapModeR()
an Int
which describes how texture coordinates outside the 0-1 range are handled. Must be one of WrapMode
getWrapModeS
public final int getWrapModeS()
an Int
which describes how texture coordinates outside the 0-1 range are handled. Must be one of WrapMode
getWrapModeT
public final int getWrapModeT()
an Int
which describes how texture coordinates outside the 0-1 range are handled. Must be one of WrapMode