[ANSWERED] ISF shaders to GLSL isadora
-
Hi,
very sorry but I've try to convert ISF shaders to GLSL isadora with the instructions (https://community.troikatronix...) but don't work.
The error message is : "Cannot Process Files with multiple PASSES: /Users/dondiego/Documents/isadora/ISF2GLSL/hsf.fs"
I would like translate this :
/* { "CATEGORIES" : [ "XXX" ], "CREDIT": "", "ISFVSN" : "2", "INPUTS" : [ { "NAME" : "width", "TYPE" : "float", "DEFAULT" : 0.25 }, { "NAME" : "offset", "TYPE" : "point2D", "DEFAULT" : [ 0, 0 ], "MIN" : [ 0, 0 ], "MAX" : [ 1, 1 ] }, { "NAME" : "color1", "TYPE" : "color", "DEFAULT" : [ 1, 1, 1, 1 ] }, { "NAME" : "color2", "TYPE" : "color", "DEFAULT" : [ 0, 0, 0, 1 ] }, { "NAME" : "splitPos", "TYPE" : "point2D", "MAX" : [ 1, 1 ], "DEFAULT" : [ 0.5, 0.5 ], "MIN" : [ 0, 0 ] } ] } */ void main() { // determine if we are on an even or odd line // math goes like.. // mod(((coord+offset) / width),2) vec4 out_color = color2; float size = width * RENDERSIZE.x; if (size == 0.0) { out_color = color1; } else if ((mod(((gl_FragCoord.x+(offset.x*RENDERSIZE.x)) / size),2.0) < 2.0 * splitPos.x)&&(mod(((gl_FragCoord.y+(offset.y*RENDERSIZE.y)) / size),2.0) > 2.0 * splitPos.y)) { out_color = color1; } else if ((mod(((gl_FragCoord.x+(offset.x*RENDERSIZE.x)) / size),2.0) > 2.0 * splitPos.x)&&(mod(((gl_FragCoord.y+(offset.y*RENDERSIZE.y)) / size),2.0) < 2.0 * splitPos.y)) { out_color = color1; } gl_FragColor = out_color; }
Thanks for your help
Best
J
-
@dondiego Isadora's GLSL support doesn't allow for multi-pass shaders. So any from ShaderToy (with the filter multipass: https://www.shadertoy.com/resu...) will not work without doing some Isadora magic (breaking the shader into discrete shaders that can be fed into each other. An example exists in the forum, but I can't locate it currently )
-
@dusx Thanks
OK. What a pity. Not being a magician, I would very much like to find this example in the forum, or is a tutorial available?
Thanks
best
J
-
I searched the forum for "multi-pass".
This might be the post that @DusX was remembering: https://community.troikatronix.com/topic/3618/logged-multi-pass-shaders/9?_=1685111395417
-
nice find. I didn't search with the hyphen.
So yes, that is indeed the post I mentioned. The example file Mark posted shows how each buffer can be used in individual glsl shader actors and chained together.
-
Thanks !
I will try !
best