O'Reilly logo

Kivy Cookbook by Hugo Solis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required