More about shaders

We briefly introduced the concept of shaders back in Chapter 2, HTML5 and WebAssembly. Shaders are a critical part of modern 3D graphics rendering. Back in the early days of computer and video games, graphics were all 2D, and how fast graphics could render was a function of how fast the system could move pixels from one data buffer to another. This process is called blitting. One significant advance in these early days came when Nintendo added a Picture Processing Unit (PPU) to their Nintendo Entertainment System. This was an early piece of hardware that was designed to speed up graphics processing by moving pixels without using the game system's CPU. The Commodore Amiga was also a pioneer in these early 2D graphics coprocessors, and by the mid-1990s, hardware for blitting became a standard in the computer industry. In 1996, games such as Quake began to create a demand for consumer 3D graphics processing, and early graphics cards began to provide GPUs that had fixed function pipelines. This allowed applications to load geometry data and execute non-programmable texturing and lighting functions on that geometry. In the early 2000s, Nvidia introduced the GeForce 3. This was the first GPU that supported a programmable pipeline. Eventually, these programmable pipeline GPUs began to standardize around a unified shader model, which allows programmers to write in a shading language such as GLSL for all graphics cards that support that language.