Question about the shader lab

Assuming I create my own shader

  1. If I add my own uniform variable, how do I get it to show up in the Bindings tab?
    (I can see that the editor provides a slider that allows you to set values right there in the code, but little sliders are very fiddly to work with - and every time I touch the variable, the sliders reset to zero!).

  2. Having created my shader, how do I export it, ie copy the whole thing to the clipboard, supposing I want to share it with other people? Do I have to select and copy the vertex and fragment parts manually, or is there a better way? It would be fantastic if it copied itself including the top and tail tags necessary to allow it to be pasted straight into Codea.

I think uniforms are only “exposed” from a shader once they have been defined AND used. So unless it’s in the shader code as well as defined at the top it won’t appear.

In terms of copying, I always copy them out manually. Now I’m used to the quirks of shader language I tend to not use the lab, except when I have a broken shader then I copy it into the lab just to get the compilation errors.