com.jme.image
Enum Texture.MinificationFilter

java.lang.Object
  extended by java.lang.Enum<Texture.MinificationFilter>
      extended by com.jme.image.Texture.MinificationFilter
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Texture.MinificationFilter>
Enclosing class:
Texture

public static enum Texture.MinificationFilter
extends java.lang.Enum<Texture.MinificationFilter>


Enum Constant Summary
BilinearNearestMipMap
          Same as BilinearNoMipMaps except that instead of using samples from texture level 0, the closest mipmap level is chosen based on distance.
BilinearNoMipMaps
          In this method the four nearest texels to the pixel center are sampled (at texture level 0), and their colors are combined by weighted averages.
NearestNeighborLinearMipMap
          Similar to NearestNeighborNoMipMaps except that instead of using samples from texture level 0, a sample is chosen from each of the closest (by distance) two mipmap levels.
NearestNeighborNearestMipMap
          Same as NearestNeighborNoMipMaps except that instead of using samples from texture level 0, the closest mipmap level is chosen based on distance.
NearestNeighborNoMipMaps
          Nearest neighbor interpolation is the fastest and crudest filtering method - it simply uses the color of the texel closest to the pixel center for the pixel color.
Trilinear
          Trilinear filtering is a remedy to a common artifact seen in mipmapped bilinearly filtered images: an abrupt and very noticeable change in quality at boundaries where the renderer switches from one mipmap level to the next.
 
Method Summary
 boolean usesMipMapLevels()
           
static Texture.MinificationFilter valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Texture.MinificationFilter[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NearestNeighborNoMipMaps

public static final Texture.MinificationFilter NearestNeighborNoMipMaps
Nearest neighbor interpolation is the fastest and crudest filtering method - it simply uses the color of the texel closest to the pixel center for the pixel color. While fast, this results in aliasing and shimmering during minification. (GL equivalent: GL_NEAREST)


BilinearNoMipMaps

public static final Texture.MinificationFilter BilinearNoMipMaps
In this method the four nearest texels to the pixel center are sampled (at texture level 0), and their colors are combined by weighted averages. Though smoother, without mipmaps it suffers the same aliasing and shimmering problems as nearest NearestNeighborNoMipMaps. (GL equivalent: GL_LINEAR)


NearestNeighborNearestMipMap

public static final Texture.MinificationFilter NearestNeighborNearestMipMap
Same as NearestNeighborNoMipMaps except that instead of using samples from texture level 0, the closest mipmap level is chosen based on distance. This reduces the aliasing and shimmering significantly, but does not help with blockiness. (GL equivalent: GL_NEAREST_MIPMAP_NEAREST)


BilinearNearestMipMap

public static final Texture.MinificationFilter BilinearNearestMipMap
Same as BilinearNoMipMaps except that instead of using samples from texture level 0, the closest mipmap level is chosen based on distance. By using mipmapping we avoid the aliasing and shimmering problems of BilinearNoMipMaps. (GL equivalent: GL_LINEAR_MIPMAP_NEAREST)


NearestNeighborLinearMipMap

public static final Texture.MinificationFilter NearestNeighborLinearMipMap
Similar to NearestNeighborNoMipMaps except that instead of using samples from texture level 0, a sample is chosen from each of the closest (by distance) two mipmap levels. A weighted average of these two samples is returned. (GL equivalent: GL_NEAREST_MIPMAP_LINEAR)


Trilinear

public static final Texture.MinificationFilter Trilinear
Trilinear filtering is a remedy to a common artifact seen in mipmapped bilinearly filtered images: an abrupt and very noticeable change in quality at boundaries where the renderer switches from one mipmap level to the next. Trilinear filtering solves this by doing a texture lookup and bilinear filtering on the two closest mipmap levels (one higher and one lower quality), and then linearly interpolating the results. This results in a smooth degradation of texture quality as distance from the viewer increases, rather than a series of sudden drops. Of course, closer than Level 0 there is only one mipmap level available, and the algorithm reverts to bilinear filtering (GL equivalent: GL_LINEAR_MIPMAP_LINEAR)

Method Detail

values

public static Texture.MinificationFilter[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Texture.MinificationFilter c : Texture.MinificationFilter.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Texture.MinificationFilter valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

usesMipMapLevels

public boolean usesMipMapLevels()