Sample Code

Introduction to compute shaders

Introduction to compute shaders

This tutorial will give you an introduction to compute shaders in OpenGL ES 3.1, how they fit into the rest of OpenGL ES and how you can make use of it in your application. Using compute shaders effectively requires a new mindset where parallel computation is exposed more explicitly to developers. With this explicitness, various new primitives are introduced which allows compute shader threads to share access to memory and synchronize execution.

Particle Flow Simulation with Compute Shaders

Particle Flow Simulation with Compute Shaders

This sample illustrates how to efficiently perform calculations on a large amount of particles using OpenGL ES 3.1 and compute shaders.

Occlusion Culling with Hierarchical-Z

Occlusion Culling with Hierarchical-Z

This sample will show you how to efficiently implement occlusion culling using compute shaders in OpenGL ES 3.1. The sample tests visibility for a large number of instances in parallel and only draws the instances which are assumed to be visible. Using this technique can in certain scenes give a tremendous performance increase.

Projected Lights

Projected Lights

Projected Lights effect using OpenGL ES 3.0.
This tutorial assumes that you already have basic OpenGL ES knowledge, and have read and understood the Shadow Mapping tutorial.

ASTC Textures

ASTC Textures

This sample describes usage of compressed ASTC textures.

Skybox

Skybox

Skybox is a method of creating backgrounds, which allows the sky, distant mountains or buildings projected onto the cube’s faces to create the illusion of three-dimensional surroundings.

Terrain Rendering with Geometry Clipmaps

Terrain Rendering with Geometry Clipmaps

This sample will show you how to efficiently implement geometry clipmaps using OpenGL ES 3.0. The sample makes use of 2D texture arrays as well as instancing to efficiently render an infinitely large terrain. The terrain is asynchronously uploaded to the GPU using pixel buffer objects.

Metaballs

Metaballs

This sample code shows how to use the new OpenGL ES 3.0’s transform feedback feature to render organic-looking 3D objects. All calculations are implemented on the GPU’s shader processors. Surface triangulation is performed using the Marching Cubes algorithm. The Phong model is used for lighting metaball objects. 3D textures are used to provide access to three dimentional arrays in shaders.

Shader Pixel Local Storage

Shader Pixel Local Storage

In this tutorial we gave an overview of the new extension that enables us to perform operations on the GPU without the need to transfer data from and to external memory. We also demonstrate how deferred shading can be implemented with this new feature in mind. Of course, the most important thing is the performance we can achieve using the new extension ([5] “Breakdown of graph data showing a 9x bandwidth reduction”).

Shadow Mapping

Shadow Mapping

Realtime shadow rendering with OpenGL® ES 2.0

Thread Synchronization

Thread Synchronization

Using OpenGL® ES 3.0 sync objects in a multithreading environment

High Quality Text Rendering

High Quality Text Rendering

Improving Quality for textured Text under Android

Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.