The texture of the cube can be changed by clicking on one of the
displayed images in the "Controls" section below.
There are various 2D and cube textures to choose from.
(W / Mouse wheel up) | Zoom in |
(S / Mouse wheel down) | Zoom out |
Drag with
pressed
mouse button | Rotate view |
(1) | Cube |
(2) | Sphere |
Mag filter
| Filter method
for magnified textures
|
Min filter
| Filter method
for demagnified textures
|
Rotate scene
| Rotate scene automatically
|
Texture mapping
In computer graphics, meshes are often refined by adding
2D pictures to the surface. To determine which pixel of the texture (texel)
corresponds to which vertex of the mesh uv-coordinates need to be added to
the vertices of the mesh.
- 2D texture mapping: Every common pixel image can be used as a
2D texture.
-
Cube mapping: A cube texture is composed of six square images
which form a cube. Cube maps are often used to create realistic
reflections (environment mapping) or to form a skybox surrounding the scene.
Filter methods
To display textures on objects which are far away or near to the camera, they
need to be scaled down or up by the GPU. Various filter methods create better or
worse results depending on the intended use:
- 1. Nearest-neighbor:
The nearest texel of the texture is determined and displayed.
The textured surfaces look pixelated" but this is the fastest filtering method.
- 2. Bilinear filtering:
The texels are interpolated in u- and v-direction linearly. Therefore magnified
textures are smoother and softer than nearest-neighbor filtered textures.
- 3. MIP-Mapping:
Mipmaps are precalculated downscaled versions of the original texture. Depending
on the scaling factor the nearest, best fitting mipmap is used. It is also
possible to interpolate within a mipmap-level linearly (2.) or nearest (1.) and
to interpolate between two mipmap-levels linearly.
Anisotropic filtering
On flat viewing angles and far distances the projection
of the texture onto the surface of the geometry appears more
rectangular or trapezoid. Therefore, multiple samples of
one texel are taken to get a more accurate projection result
which creates a sharper appearance.