danielfvm / shadow

A live and interactive wallpaper "engine" for Linux and Windows. It supports mixing various formats like glsl-shaders, images, videos and GIFs to create an amazing wallpaper. Additionally you can expand it's functionality with scripts.
GNU General Public License v3.0
54 stars 7 forks source link

Support for www.shadertoy.com shaders? #19

Closed AverageLinuxEnjoyer closed 2 years ago

AverageLinuxEnjoyer commented 2 years ago

Most of those require additional uniforms, like:


uniform vec3      iResolution;           // viewport resolution (in pixels)
uniform float     iTime;                 // shader playback time (in seconds)
uniform float     iTimeDelta;            // render time (in seconds)
uniform int       iFrame;                // shader playback frame
uniform float     iChannelTime[4];       // channel playback time (in seconds)
uniform vec3      iChannelResolution[4]; // channel resolution (in pixels)
uniform vec4      iMouse;                // mouse pixel coords. xy: current (if MLB down), zw: click
uniform samplerXX iChannel0..3;          // input channel. XX = 2D/Cube
uniform vec4      iDate;                 // (year, month, day, time in seconds)
uniform float     iSampleRate;           // sound sample

They also don't have a main function.

Any chance we'd get support for that?

AverageLinuxEnjoyer commented 2 years ago

Nvm, saw your frag2.glsl file and figured out I just had to rename the variables and create a main function to call the shader function in.