by dff180
Simple console tool to test OpenGL ES 2.0 fragment shaders on the Raspberry Pi.
Fragment shader and optional texture are specified on command-line.
Sample video: https://www.youtube.com/watch?v=F0mfntGDmxg
-
EGL class code by Jon Macey
-
Sample shaders from ShaderToy by Inigo 'iq' Quilez. Explore the ShaderToy website for additional shader and texture usage examples.
-
Sample textures from http://elout.home.xs4all.nl/texl/tex/index.html
Note: The following instructions are for Raspbian Wheezy Raspberry Pi installs (2013-05-25-wheezy-raspbian). They assume that you already have set up a working development environment where you can compile the hello_pi examples.
- Get sources with
git clone https://github.com/dff180/pishadertoy.git
- Install dependencies with
sudo apt-get install libsoil-dev
cd pishadertoy
make
-
Make sure to use latest firmware and 192/64 memory split
sudo rpi-update 192
-
Start from Raspberry Pi console or via SSH client
-
Exit program with CTRL-C
-
Using default fragment shader
./pishadertoy
-
Using fragment shader which doesn't need texture
./pishadertoy shaders/flower.f.glsl
-
Using fragment shader with texture
./pishadertoy shaders/relieftunnel.f.glsl textures/texl2.jpg