However, I came up with an analogy that made it much simpler for me to think about them. When I first started learning about shaders, I had a tough time getting my head around how they work. This difference comes with its own set of rules and limitations, but we’ll cover those later.Įach shader is made up of two separate scripts: a vertex shader and a fragment shader (also referred to as pixel shader). Shader code is similar to regular code, but it is (almost always) executed by the GPU (your graphics card), not the CPU (your processor). Initially created to provide shading for lighting (hence the name), they are now used to produce a huge variety of effects. To follow along, you do not need any previous knowledge of these features, but it is necessary that you have a basic understanding of programming and know your way around GameMaker Studio 2.
They are also among the most advanced features offered by GameMaker Studio 2, but I will try to explain everything as simply as possible in this post. Shaders are often used to create beautiful graphical effects in games.