Closed MattYule closed 1 year ago
Dear Matt, Your message comes at the perfect time ! I just finished implementing ShaderToy in vimix! It is working well and can already be tested if you compile from source or from linux Snap in unstable version. For OSX, a beta binary can be downloaded here : may be unstable, i am in the process of preparing version 0.7.1
To add shaders, the system is simplified from GLMixer: now you clone the source and set the filter on the clone. You can thus chain as many filters as you want (if computer's GPU follows..). You can use ShaderToy code in the Custom Shader:
Thanks for your input on the features and for signaling bugs!
Dear Matt, Your message comes at the perfect time ! I just finished implementing ShaderToy in vimix! It is working well and can already be tested if you compile from source or from linux Snap in unstable version. For OSX, a beta binary can be downloaded here : may be unstable, i am in the process of preparing version 0.7.1
To add shaders, the system is simplified from GLMixer: now you clone the source and set the filter on the clone. You can thus chain as many filters as you want (if computer's GPU follows..). You can use ShaderToy code in the Custom Shader:
Thanks for your input on the features and for signaling bugs!
Great - thanks Bruno for the reply. I've downloaded the link but still a bit stuck as you how you add shaders?...What do you mean by 'clone the source' and how is this done please? Presumed it was via + and then add via File/ Sequence / Connected / Generated / Internal ? Could you advise? Much appreciated
Okay I'm nearly there - I've got into the custom shader - I then go to the website to select the shader - I've copied all the data and tried to paste but get an error message - do you select the webpage address instead? Please can you advise, showing step by step (apologies for being dense with this - but I'm a newbie to video editing etc)
Good ! You should be able to copy & paste the code of the shader. But indeed, for Shader errors and compatibility of ShaderToy with OpenGL and vimix, i'm afraid there is a bit of knowledge in GLSL programming required... I planned to make a wiki page with more details, just didn't do it yet!
So, in short for now:
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 uv = fragCoord.xy / iResolution.xy;
fragColor = texture(iChannel0, uv);
}
#define PROCEDURAL 1
void mainImage( out vec4 fragColor, in vec2 fragCoord ) { vec2 uv = fragCoord/iResolution.xy;
vec2 warp = texture( iChannel0, uv*0.1 + iTime*vec2(0.04,0.03) ).xz;
float freq = 3.0*sin(0.5*iTime);
vec2 warp = 0.5000*cos( uv.xy*1.0*freq + vec2(0.0,1.0) + iTime ) +
0.2500*cos( uv.yx*2.3*freq + vec2(1.0,2.0) + iTime) +
0.1250*cos( uv.xy*4.1*freq + vec2(5.0,3.0) + iTime ) +
0.0625*cos( uv.yx*7.9*freq + vec2(3.0,4.0) + iTime );
vec2 st = uv + warp*0.5;
fragColor = vec4( texture( iChannel0, st ).xyz, 1.0 );
}
3. Back in vimix, paste the shader code in the editor
4. Hit 'Build' to compile
Errors depend on the code you put, so I cannot say what problem you encounter.
What will not work:
- ShaderToy effects with multiple pass (more than one tab)
- ShaderToy effects with mouse interaction (i.e .imouse variable)
if you send me the link to the ShaderToy effect you want, I can tell you if its possible !
Great - many thanks for this - I'll have a play and see how I get on, will let you know re any shaders I get issues with - cheers Bruno!
A documentation is now available to explain this feature of r0.7.1 at https://github.com/brunoherbelin/vimix/wiki/Filters-and-ShaderToy
Hi, I have downloaded and started to use Vimix, which is great and many thanks for it.... Can someone help how to import Shaders from Shadertoy? This was something which could be done in GLMixer so I'm guessing the same can be done with ViMix? Much appreciate any help / advice :)