When I was asked how OpenGL® ES 3.0 would improve my buddy's ARM® Mali™-T604 powered Nexus 10 I sighed, looking in exasperation at my unknowing friend. How could he, a self-proclaimed tech geek, not know the benefits of OpenGL ES 3.0?!?
I decided to write a blog to answer his question. After all, the improvements in OpenGL ES 3.0 are of interest to a wider audience than just my friend. The ARM Mali-T604 is an awesome product - something the Nexus 10 is able to show really well with its super high res screen.
But it just got even more amazing with today's introduction of OpenGL ES 3.0 in Android 4.3. This update rolling out now to Mali-T604 powered Nexus 10 enables developers to take full advantage of OpenGL ES 3.0 as a standard feature of Android.
So what is it about OpenGL ES 3.0 which makes it better?
With the introduction of OpenGL ES 2.0 back in March 2007, we saw the first programmable shaders on mobile GPUs. Today there is no doubting the significant leap in the visual quality of mobile games this led to. Yet someone reading this blog may still ask whether mobile graphics wasn't at a high enough level already or why OpenGL ES 1.1 wasn't enough for mobile content...
What the Khronos Group realized was that the technology used in the mobile space was quickly closing the gap with that in the desktop space. By introducing programmable shaders in 2007, Khronos managed to simplify the transition from desktop to mobile, tempting desktop developers to approach mobile platforms. With all of the great games and apps existing today, I would certainly say Khronos succeeded. But since 2007 a lot of things have happened to graphics content and an update to OpenGL ES 2.0 was due.
OpenGL ES 3.0 closes the gap between the desktop and mobile graphics world even further. With several added features developers are more able than ever to transition between desktop and mobile platforms. In addition to this, OpenGL ES 3.0 saves system power without losing any visual quality. After all, playing games on a mobile platform is more compelling if you are able to do it without being plugged in to the charger.
Let me go through the various features that make OpenGL ES 3.0 better than its predecessor:
OpenGL ES 3.0 brings several new texture formats to mobile. With the inclusion of floating point textures, developers are able to use high dynamic range textures to build up their scene. 3D textures can be used to store layered information, as demonstrated by the road in our demo, Timbuktu 2.
Non-power-of-two textures, depth textures, R and RG textures bring long-sought formats to mobile devices. All of them are efficient wrappers for texture information that do not require three colour channels and power of two sizes. This addition enables more efficient use of memory and saves power further by only transferring the colour channels needed from memory.
OpenGL ES 3.0 has also introduced a new mandatory texture compression standard, ETC2. This is of great importance to developers as from now on every OpenGL ES 3.0 compliant device has to support ETC2. It lets the content developers compress the texture only once, and re-use the same assets on all OpenGL ES 3.0 compliant devices.At the same time Khronos also introduced Adaptable Scalable Texture Compression as an extension to OpenGL ES 3.0. And with the introduction of second generation Mali-T600 series GPUs, ARM is already providing full hardware support for this format. The visual quality improvements that this new standard brings will benefit end user devices in the second half of this year.
GLSL ES 3.0 is the latest update to the OpenGL ES Shading Language. Going from GLSL ES 2.0 to GLSL ES 3.0, there are lots of improvements allowing easier development and increased visual quality. Full support for 32 bit floating point operations as well as for 32 bit integers enhance the visuals. Uniform buffer objects allow simple sharing of uniforms across shader programs. Sampler objects decouple texture data and texture sampling parameters, easing the mixing of filter modes from the same texture.
Geometry instancing allows multiple instances of the same geometry to be rendered without the need to re-upload the geometry to the GPU. Each of the rendered instances can still have unique properties applied through both the vertex and fragment shaders. This allows lower bandwidth utilization between the GPU and CPU whilst at the same time lowering CPU involvement in the drawing process.
Boolean occlusion queries introduce GPU accelerated culling techniques for developers. By leveraging the GPUs massive compute capabilities, the games are able to discard rendering of entire objects early in the rendering process. This leaves more processing time for the objects that are visible, enhancing the visual quality of what end users can actually see on the screen.
Transform feedback enables capturing the vertex shader output from the GPU. This output can be used as input to the next frame. This enables physics simulations running entirely on the GPU, a good example of which are particle systems where both the drawing of the objects and updates of the vertex positions are all done on the GPU. This is more efficient than transferring the particle positions back and forth between the GPU and CPU for each frame.
Last but not least of the OpenGL ES 3.0 features is multiple render targets. With this feature deferred shading can finally be accomplished on mobile GPUs. Using multiple render targets enables the developers to render depth, colour and stencil information to separate buffers — reusing the same buffers in later passes through the pipeline. This is the basic deferred shading operation and the result can be seen in many modern desktop games — soon to be seen on mobile.
It is all about power
As you all know the mobile space is all about power. If a mobile phone had to be plugged into the wall to run 3D content users would probably not use it for 3D content. Thankfully, OpenGL ES has been designed with this in mind. Thanks to the push for a programmable pipeline in OpenGL ES 2.0 we saw increased GPU energy efficiency. The features added in OpenGL ES 3.0 take OpenGL ES 2.0 energy efficiency even further. Minimizing the energy cost of each draw call, while at the same time improving the visual quality of the output, is at the essence of this new standard. And in order to do this Khronos and ARM have taken a system wide approach to lowering total system power. In general 3D graphics workloads, when offloaded from the CPU to the GPU, will lessen the energy usage. However, if offloading a task requires transfers of large memory blocks, you might be better off simply doing it on the CPU instead. After all, transferring memory costs power. So minimizing the memory transfers is a huge issue when designing GPUs for the mobile space. Supporting OpenGL ES 3.0 lets developers take advantage of the latest technologies in order to achieve as efficient designs as possible.
Games to the next level
What is, without a doubt, the most important factor for end users? Better looking games and apps. No one cares if a game is capable of being played for three hours longer than the last version if the last version actually looked better and had more responsive gameplay. And this is the main intention of OpenGL ES 3.0. With the addition of the features mentioned above, OpenGL ES 3.0 enables systems designers, OEMs and developers to design better looking and more compelling games. Bringing games to the next level. That is what it is all about. It is indeed what is making the ARM Mali-T604 even more amazing than before.