Ability to edit GLSL shader code in Vuo Editor



I would really like to see this polished off, especially with some debug messages printed at the bottom of the code window when there are compilation errors. It’s too hard to drive blind.

1 Like

Yeah, definitely, it’s hard to write code in a plain text editor. This feature request includes an error display (similar to the Calculate node).

As a workaround in the meantime, the errors for Make Image with Shadertoy show up in Console when you run the composition.

1 Like

This request also great for prototyping glsl code. The last thing you want to do is work out the bugs with your glsl while coding a node.

So further to this- are there plans to expose the vertex- geometry - and fragment shaders?

Also how do you guys think this node would generate dynamic inputs? Like if someone wanted to use multiple images (texture + depth map for example). In the calculate node we simply add a “variable name” would that also happen with this? Would there be special variable names to denote different inputs, such as iChannel in shadertoy? (So different ports get generated for texture - real - integer and characters)?

Chosen to be implemented.

Also @jstrecker,would there need to be special variable names for sharing between vertex and fragment shaders? As there are some cool speed tricks that that technique enables. (Such as only processing certain variables per vertex as opposed per fragment.)

I just updated the “Notes from Team Vuo” section of this feature request with some details on how this will work.

@alexmitchellmus, I think that answers all of your questions except for sharing variables between shaders. GLSL allows passing varying (in/out) values from a vertex to a fragment shader. That will still be possible in Vuo’s GLSL code.

Wow @jstrecker, didn’t notice that you updated the deployment info. Great!

One question: if we edit our code in another editor, (Text Wrangler) what sort of JSON header info is needed? (standard Vuo Node or something different?)

And can we make it from scratch in another text editor- or do we need to generate from within vuo first?

@alexmitchellmus, the JSON header would be similar to the ISF one, which is described in the section The ISF “Specification” on http://vdmx.vidvox.net/blog/isf . In addition to the ISF keys, the JSON header would have a way to specify other metadata Vuo uses, like title and keywords.

Yes, you could use your own text editor if you wanted.

1 Like

super to see this node moving ahead.


So cool! I have to constantly remind myself not to vote for this feature because its already happening! :-) #gamechanger

1 Like

For those who dont know, this functionality already kind of is working with Karls Vuo Nodes.

There is a node: Make Shader with GLSL and I am already trying it out. The way you pass uniform variables is pretty neat. But its such a pain to work with the text input field. And debugging is really not fun. Because there is no debugger. Any form of feedback would be nice - not just black screen and you pretty much guess where the error is.

My workflow right now is i try something out in Shadertoy and then copy paste, change some variables (for example fragCoord to gl_FragCoords), and so on.

Is there any information how the implementation of the native solution will work? I really hope there is some solution for the text input. Maybe something like a dynamic text load from a *.glsl file would be awesome. Because as already stated, the text input field is no fun. I would like to have shortcuts for commenting and so on. So working with an external text file would allow to use any plain text editor - like sublime.

Also some debug log for the errors is necesarry to work with GLSL code.

I am really looking forward to this feature and I hope it is good. The stuff you can do with just a Fragment shader is so mindblowing. Is this already in development (yes i can read, that it isn’t) but what is the vuo team developing on atm? (don’t want to sound rude - just being curious)

edit: For those who dont know (including myself): You can use the Console.app as glsl debugger. In the system.log you can find the Error.  

@scrat, our plan is to provide a GLSL editor within Vuo that would appear in place of the composition canvas. Similar to how you can drill down into a subcomposition node to view/edit its internal nodes and cables, you’d be able to drill down into a GLSL node to view/edit its source code. See the details at the top of this page under “Notes from Team Vuo”.

We have not been diligent about updating feature request statuses to “Implementation in progress” when we are working on things. Most of the time they magically skip from “Chosen to be implemented” to “Released” :) The team is now concurrently working on some things for the 1.2.5 release and some for the 1.3 release. This includes various feature requests, bug fixes, usability improvements, and right now some prerequisites for this feature request. We plan to include the GLSL editing feature in Vuo 1.3.

1 Like

I have been thinking about this more lately…

I saw this, which is pretty cool: GitHub - patriciogonzalezvivo/glslEditor: Simple WebGL Fragment Shader Editor

It seems like some of the popup GUI element stuff could be really helpful. Not sure. I could see it possibly bogging down on slow shaders.

Having a way to do keep your helper functions in separate files/pages/nodes (however it works out), and then import them in other parts of the shader…will be REALLY helpful.

I don’t know how possible it would be, but having a way to store code snippets in a library, like the node library, would be amazing.  

1 Like

Resolved in Vuo 2.0 beta.