GLSL: Vertex shaders/vertexshaderart.com port

Has anyone tried to port shaders over from vertexshaderart.com? I have been attempting to port any of the shaders found there with no luck. Im thinking its because these shaders are built mainly to run as vertex shaders and not pixel shaders like I am used to. I have gotten things working from shadertoy and glsl_sandbox in TD but Im still having some trouble with these guys.

I was trying to port this shader over:vertexshaderart.com

any help would be appreciated

Hi there,

yeah it looks like those are only a vertex shader and generating a ‘v_color’ that is used to render a ‘particle’.
To make this work in touchdesigner, you need to create some vertices (f.e. line SOP → convert SOP to particles). Then create a new material (f.e. phong MAT → export) and supply the code to the vertex shader. Though there are some stuff you need to update.
Thinks like ‘resolution’, ‘time’, ‘vertexId’ and ‘vertexCount’ are variables that are predefined on vertexshaderart.com, so you will need to create some uniforms to be able to access them.

Perhaps it sounds a bit complicated, so I added a quick version, so you can take that as an example. Hope it helps.

Cheers,
tim
VertexArtShader.tox (2.72 KB)

Tim,

Thanks for your reply that helps alot actually! Based on your TOX I was able to get another shader working. Next I will try out getting the sound going but this was a huge help!

I did have one question though @Tim, how would I know what the correct vertex shader syntax for TD? I see you added

out Vertex
{
vec4 color;
} oVert;

to the beginning and changed v_color to oVert.color at the end.

we talked about it on slack, but will post it here as well in case somebody else is reading this :slight_smile:

I exported a normal phong mat and took that as basis. Since the vertexshaderart shaders only render vertices as pointsprites using their vertex color, I stripped away all unnecessary attributes ending up with only the color.

Excuse me
How to handle soundcloud data used by vertexshaderart.com with touchdesigner?
Please tell me only hints.

help.soundcloud.com/hc/en-us/ar … ed-players

From the examples I’ve seen, these visuals are not audio reactive, there is just audio embedded behind them. You would embed tracks in a simliar way in your own website using Soundcloud’s method’s linked above.

If you wanted to get isolated Soundcloud audio into your TouchDesigner project you would have to use something like Dante Via to isolate audio from seperate software, or less preferably, use the stereo mix option in an audiodevicein and ensure no other sound sources are being played.

It also would be possible to use the WebBrowser Comp, make sure you use the setting page to include audio, but this method would only give you sound, not chopAudio ie no access to convert Audio into data.

Excuse me.
I do not want to use soundcloud.

I want to handle sound data.
Can I get data from Arrays of GLSL MAT?

I do not know whether to obtain sound data from samplers.

I’m sorry but could you teach me?

@GRNCH very helpful thank you! I was successful in converting another example from the site. I wonder, is there a way to take a random array of transparent PNGs and add them to each Vertex?

Also, I don’t see a way in TD to select, gl_line_loop, gl_lines, gl_tri would love to know how to set that as well.

Thanks for any help on this! vertex_art_conversion.toe (6.1 KB)