28-06-2017: Please use the get-image-glsl
repo from now on:
https://github.com/graphicsfuzz/get-image-glsl
A tool for rendering a fragment shader to a PNG file.
You will need CMake. Look at Dockerfile
for the required packages if building on Debian/Ubuntu (gcc-mingw-w64
is only needed when cross-compiling for Windows, git
and golang
are only needed for uploading releases).
- Change into
build/
. - Execute
./build-linux
(or another./build-*
file for other platforms/configurations). - The binaries will be in
out/linux/install/bin/
.
Run get_image
on the provided simple.frag
shader to test that it works. E.g.
out/linux/install/bin/get_image --persist simple.frag
./get_image <PATH_TO_FRAGMENT_SHADER>
Useful flags:
--persist
- causes the shader to be rendered until the window is closed--output <OUTPUT_FILE>
- a png file will be produced at the given location with the contents of the rendered shader (default isoutput.png
)--vertex <PATH_TO_VERTEX_SHADER>
- provide a custom vertex shader file rather than using the default (provided inget_image.cpp
).