Machuchu — a GLSL (OpenGL Shading Language) viewer.
Fig. 1. Machuchu with shader/voronoi_hsv.f
loaded.
Machuchu loads GLSL shader source code and renders it, producing animated live image. Depends on shader, resulting image may be very trippy (see fig. 1).
Shaders may be parametrized using so-called uniforms (uniform variables) inside GLSL code. Machuchu let you edit value of uniforms using GUI controls.
We called it machuchu because we love Miyamoto-sensei. [1]
- Run
./machuchu
. - Click a "Load" button or press Ctrl+O and choose a shader file (.f).
Example shaders can be found inside
shader/
directory. - Controls:
w
,a
,s
,d
, Middle/Right mouse button — pan a viewc
— position reset,
— zoom out.
— zoom in- Mouse wheel — zoom in/out
v
— zoom resetp
— pausef
— toggle a shader panelF10
— timer resetESC
— quit
- Machuchu automatically reloads shader's code on file change.
Machuchu extends Shading Language in following way:
#include "FILENAME"
and#pragma once
— as in C language.#pragma machuchu slider VAR FROM TO
— use slider with rangeFROM ≤ value ≤ TO
to control variable namedVAR
. Otherwise it will be controlled by editable text field (non-bool uniforms) or checkbox (bool uniforms).