How To Use Skia Shader SkSL Shading Language Code in C++ Builder?

Yilmaz Yoru
C++ Builder

--

The latest RAD Studio / C++ Builder 12 comes with a lot of new features, one of which is Skia graphics library support in C++. Skia is an open-source graphic library that provides to support a variety of hardware and software platforms. One of Skia’s amazing features is its support for the shader graphics SkSL Shading Language. That means you can use GPU Shaders with Skia in C++ Builder 12. In this post, we explain what a shader is, what is the SkSL Shading language, how you can create Skia shader code, and how you can run animations based on SkSL code in C++ Builder.

Skia is an open-source graphic library that provides support variety of hardware and software platforms. Skia is sponsored and managed by Google but is available for use by anyone under the BSD Free Software License. Mainly designed for Google Chrome and ChromeOS, Android, Flutter, Mozilla Firefox and Firefox OS, and many other products. The core components are done by the Skia development team but they consider contributions from any source.

In modern graphics, a Shader is a GPU based program that calculates pixel colors by using Shader tasks in GPU, such as levels of light, darkness, and color during the rendering of a 3D scene. This process is known as a shading process, and it is a GPU based computation. Modern graphic cards have evolved to perform a variety of specialized functions in computer graphics, and shaders can be used for special effects and video post-processing, as well as general-purpose computing on graphics processing units. They can be used in some GPU based multi-threaded operations.

Here is a good C++ Builder example how your graphics are improved by shaders.

https://learncplusplus.org/how-to-use-skia-shader-sksl-shading-language-code-in-c-builder/

--

--

Yilmaz Yoru
C++ Builder

Mechanical Engineer (MSc PhD), Developer, Founder of Esenja Company, Embarcadero C++ Builder MVP