Introduction to shaders
Many developers develop games on Android, but do not possess much knowledge about shaders. In most cases, developers do not need to work with shaders, or there are some pre-defined shaders inside the game development framework or engines.
In 1988, the animation studio Pixar introduced the modern concept of shaders. However, GPUs were not capable of handling shaders at that point of time. OpenGL and Direct3D are the first two graphic libraries to support shaders. GPU started supporting shaders through pixel shading at the 2D level. Soon, it was enhanced to support vertex shaders. Nowadays, geometry shaders are also supported by OpenGL 3.2 and Direct3D 10 libraries.
Let's now dive a bit deeper into shaders to understand their definition, necessity, and scope for Android games.
What is a shader?
In simple words, a shader is an instruction set to manipulate the visual display of the input graphic assets.
Let's elaborate the definition a bit. All the instructions are basically...