A (175)

(Tuis.) #1

594 CHAPTER 16: The Future of Android: The 64-Bit Android 5.0 OS


Enhanced Texture Mapping functionality, such as Multi-Sample textures, can yield higher edge
quality in texture maps (similar to the anti-aliasing you learned about in this book), and stencil
textures can enhance the illusion of depth in a texture map that can be created using textures rather
than actual 3D geometry (the underlying mesh or model). These advanced features allow 3D game
output quality that rivals the traditional game platforms, such as PlayStation or Xbox, and it’s clear
that Google is going after the 3D game console space with Android 5 OS. There are already three
Android-based game consoles on the market, ranging from $99 (OUYA and Amazon Fire TV) to $199
(nVidia Shield). These will be upgraded to Android 5 by 2015.


OpenGL ES 3.1 also supports something called a Compute Shader. These are not actually texture
maps or shaders at all, but rather they are programming constructs that allow developers to use
the GPU to perform non-3D related calculations (using the GPU, rather than the CPU). In game
applications, a popular implementation of a compute shader is to offload game physics calculations
onto the GPU. This is often done because current GPU technology is more powerful than CPU
technology when it comes to solving complex mathematical calculations that are commonly utilized
in i3D games applications.


Many new popular software packages, such as GIMP 3.0 and EditShare Lightworks 12, use this
capability to make their 2D software perform complex special effects and pixel filter applications at
lightning-fast speeds.


Your software can also utilize compute shaders, as long as you have an nVidia GeForce or AMD
Radeon GPU in your system (or by now, in your Android devices). Android devices that feature the
Tegra K1 microprocessor (manufactured by nVidia, and currently in the Shield and Fire TV) can thus
use the GPU for non-3D-centric computation using these compute shaders.


OpenGL ES 3.1 is backward compatible with OpenGL ES 2.0 and OpenGL ES 3.0, so rest assured
that none of your previous 3D or i3D code will be broken! OpenGL ES 3.1 will offer optional
“extensions” that allow third-party manufacturers (such as nVidia) to add things like advanced
blending modes (for texture layer compositing special effects) and fine-tuned shading effects, such
as those found in the full OpenGL 4.4 specification. In fact, the Android Extension Pack (AEP), which
you’re going to examine next, is a prime example of this feature.


Extending OpenGL ES: The Android Extension Pack (AEP)


There is an additional extension to the OpenGL ES 3.1 standard called AEP, or Android Extension
Pack. AEP allows features such as those found in the full OpenGL 4.4 release, so that console
games with 3D graphics that are similar to those in Unreal 4 and Halo 4 will be able run on Android
5.0 and later hardware devices that support GPU hardware like the Tegra K1.


Three primary features of the AEP include Tesselation Shaders, Geometry Shaders, and Adaptive
Scalable Texture Compression, or ASTC™, all of which are covered in this section of the chapter.
Geometry shaders were the first feature to come out in OpenGL, so let’s cover that concept first.


The geometry of a 3D object is the underlying 3D model (like a shape only in three dimensions
instead of two), which is also sometimes referred to as the mesh because, without any texture
mapping, that is exactly what it looks like. Another term that comes from this mesh-like 3D geometry
is a wireframe. A mesh is made out of polygons, each of which are usually triangular (called “tris”) or
quadrilateral (called “quads”).

Free download pdf