-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Getting Started with SpriteKit
By :
A shader or an instance of the SKShader class is an object that represents an Open Graphics Library Embedded Systems (OpenGL ES) or (GLES). It is a fragment shader, which is an algorithm that modifies the drawing behavior of the node that it is applied to.
Open Graphics Library (OpenGL) is an application programing interface that utilizes the Graphics Processing Unit (GPU) to render graphic elements.
You can use the effect shown in the following screenshot by applying shaders:

In order to apply a shader to a node, we need to create a SKShader instance from a fragment shader algorithm and assign it to the shader property of the desired object.
The shader creation and compilation takes a big amount of CPU memory. So that's why we need to keep in mind the following things:
Change the font size
Change margin width
Change background colour