Game Development Reference
In-Depth Information
Android fully implements the OpenGL ES 3.1 specification. However, the following are some
caveats you should consider before using this technology to build your games:
OpenGL ES 3.1 is not supported in all versions of Android. If you are
targeting the largest breadth of devices out there, you should stick with
OpenGL ES 1.x.
OpenGL ES 3.1 implements the slickest ideas and technology in
graphics rendering; however, that doesn't necessarily mean that the
code will be better or run faster.
It does provide a desirable characteristic, nevertheless: it is designed to reduce power
consumption in embedded systems such as phones, so it could reduce your game's overall
power requirements and provide more efficient graphics rendering. All in all, having a solid
knowledge of OpenGL ES 3.1 is a good thing for your résumé. Chances are that if you are
a graphics developer looking for a job, the very first thing you'll be asked about in a job
interview is your knowledge about shaders and GLSL.
Shaders
A shader is a simple program that describes the traits of either a vertex or a pixel. At the
low level, a shader defines a set of software instructions used to calculate rendering effects
with a high degree of flexibility. Shaders were created to replace the traditional desktop
OpenGL fixed-function pipeline that allowed only common geometry transformation and
pixel-shading functions. They provide the following advantages over the traditional desktop
OpenGL pipeline:
Customized effects can be applied for rendering.
A higher degree of flexibility.
Simplicity and higher degree of reusability.
There are three basic types of shaders implemented in OpenGL ES 3.1: vertex, fragment,
and geometry.
Vertex Shaders
Vertex shaders are run once for each vertex given to the GPU and transform the 3D
position in virtual space to the 2D coordinate for on-screen rendering. They can manipulate
properties such as position, color, and texture coordinates but cannot create new vertices.
Fragment Shaders
Fragment shaders (also known as pixel shaders) calculate the color of individual pixels.
They are typically used for scene lighting and related effects, such as bump mapping
and color toning, and are often called many times per pixel for every object that is in the
corresponding space.
 
Search WWH ::




Custom Search