Editing shaders

Kivy, of course, permits us to work with shaders. The shaders calculate rendering effects with the help of the GPU. In this recipe, we will use a predefined shader that we will load from a glsl file, which is the common extension of the OpenGL Shading Language (GLSL).

Getting ready

We are going to need a glsl file to work with in this recipe; there exist thousands free on the Web.

Note

A nice place to look is the site http://www.iquilezles.org/apps/shadertoy/index2.html where you could find your favorite.

Also, you should be familiar with some concepts about shaders, so you can start reading the Wikipedia article at http://en.wikipedia.org/wiki/OpenGL_Shading_Language.

How to do it…

In this recipe, we will use the KV, Python, and glsl ...

Get Kivy Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.