Skip to content

A Shadertoy.com/GLSLSandbox.com like standalone desktop application

Notifications You must be signed in to change notification settings

kuzy000/runfragment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Runfragment

runfragment is a standalone utility that replicates the rendering functionality of Shadertoy.com and GLSLSandbox.com. It also keeps track of file changes and automaticly applies them.

Usage

Run

You can run it for a single fragment shader file:

runfragment Image.glsl

or

runfragment --Image Image.glsl

By default runfragment uses GLSL Sandbox uniforms format, you can change it with --format shadertoy (-f s) option.

Now you can edit the shader using your favorite text editor and it will be reloaded on save.

Channels

You can set channel for Image (main) shader or for Buf (buffer) in that manner:

runfragment --format shadertoy --Image Image.glsl --Image-c0 tex.png

In the same way as in Shadertoy a channel can be set as render buffer:

runfragment --format shadertoy --Image Image.glsl --BufA BufA.glsl --Image-c0 BufA

Config

If you tired to type all this arguments, you can use config file:

runfragment -c config.ini

config.ini:

format = shadertoy

Image = Image.glsl
Image-c0 = BufA

BufA = BufA.glsl

Downloading

It also has --download option which can be used to download a shader from shadertoy.com (creates directory with a config file and other files) and glslsandbox.com (creates a single shader file).

runfragment --download https://www.shadertoy.com/view/MdX3zr

Build

git submodule init 
git submodule update
mkdir build
cd build
cmake ..
make

Requires

  • CMake
  • Boost.Program_options
  • Boost.Filesystem
  • GLEW
  • GLFW3
  • OpenSSL
  • FreeImagePlus

Not implemented features

  • Keyboard
  • iResolution and (probably?) several other uniforms
  • Sound functionality
  • Video functionality

License

MIT

About

A Shadertoy.com/GLSLSandbox.com like standalone desktop application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published