Matchbox Help Thread

Making this thread as a place where people can post matchbox-related questions. Note, this is NOT a request thread, so if you want a matcbox that does all your keys, please make your own thread. This thread is for people who (like me) are horrible at coding, but would like to make matcboxes.

allow me to start with my personal problem:

I was going through @Graziella’s awesome Logik Live 102 Matchbox tutorial and I ran into a problem where my script wont compile correctly. As far as I can tell I’ve got the script from the show matched properly, but when I run the “shader_builder -m” command I get this error:

“ERROR: One or more attached shaders not successfully compiled”

despite this, the shader_builder writes out an XML file and I can at least load my matchbox into flame, although it’s lacking an input and doesn’t do anything at all. (these are big steps forward for me)

If anyone has thoughts as to why I’m getting this error, I’d love to hear them. Google shows me it’s an error people get outside of matchbox development, but I can’t make heads or tails of how to fix it in my case.

here’s my code:

uniform float adsk_result_w;
uniform float adsk_result_h;
uniform sampler2D input1;

void main (void) {

vec2 normCoord = gl_Frag_Coord.xy / vec2(adsk_result_w, adsk_result_h);
vec4 colorImage = texture2D (input1 , normCoord);

gl_FragColor = colorImage;

}

2 Likes

Looks like it is because you are using gl_Frag_Coord.xy, it should be gl_FragCoord.xy

2 Likes

For some reason, the Mac compiler won’t give you specific errors on specific lines.
So, if you can write your shaders on a Linux box, you’ll get way better feedback than “I dunno, something’s wrong I guess.”

If you can’t use Linux, I’d recommend code editing software like Visual Studio Code (free from Microsoft).
That can give you errors and warnings that the Mac compiler won’t.
Of course, setting up VSC can be its own hurdle.

-Ted

1 Like

Yes very good point - VSCode with some of the extensions are helpful with getting the formatting right.

Thanks guys! I’ll be back soon with more obvious questions. :smiley:

2 Likes