As an example can you point us to some of the ones that are failing for you? Any written with GLSL 1.20 won’t work since OSX doesn’t support that with their OpenGL 3.3+ drivers.
Unfortunately no, it’s a limitation of macOS that they don’t support GLSL 1.20 in their OpenGL 3.30 driver. The only way to avoid it is to upgrade the shader to GLSL 3.30, which isn’t a huge task luckily.
I see. Are there any existing project files which already have GLSL 3.30 shaders that work on OSX?
I have started looking at the intro tutorials to GLSL and the basics of TD but I really want to just open up a working project to see how things fit together down the line…
TD-Particle-Flowfields is actually GLSL 4.00 and 4.30, which is also why it fails on macOS.
The waves one doesn’t seem to have much GLSL actually, when you cloned the repository did you also get the ‘shared’ submodule?
You can do that with
git submodule init
git submodule update
Or download that project manually and put it in the shared directory.
If you want to learn GLSL I’d advice you to begin with some simpler shaders, as you’ve chosen not the most easy ones for beginners to dissect.
That said, I’ve converted the TD-particles-flowfield from Asterix to GLSL 3.30 so you can have a look. I just tested it on my MacBook Air and it works. particles-flowfield_glsl330_OSXv2.toe (10.8 KB)
Another advanced GLSL example is particlesGpu, it comes with TD and you can drag it in your network from the Palette
(it’s under Tools)
that is correct, this example was not made to show any output in perform mode(F1).
You need to go one level deeper, so scroll your mousewheel to zoom in until you enter the first Comp called “Composition”, in that network you’ll see some output. From there, zoom in to the Comp called ‘particles1’ to see more of the network.
I’d start with simpler ones. I know very few people who “just dived in” to GLSL shaders. You basically buckle down with the GLSL orange book or you start with tutorials and just build your way up.
Good intro to shaders in TouchDesigner is in our book, I believe we stuck to GLSL 3.30, but if not and you have errors, you can just post on the forum: nvoid.gitbooks.io/introduction- … ction.html
#extensions are processor-specific — I’d google the name of the extension and the name of your graphics card together and try to find documentation to see if your card supports that specific extension
Movingninja - are you the movingninja from Tectonic?
Hi There! I’m trying to get this example to work but the only error I am faced with is the particleMotion text linked to the GLSL Multi TOP. Do anyone know how to fix this?
error:
Pixel Shader Compile Results:
ERROR: 0:1: ‘’ : syntax error: #extension must always be before any non-preprocessor tokens
Things such as #extensions should be specified in a DAT via the Preprocess Directives parameter, not in the shaders directly. That way it ensures it’s placed before other code that we add to your shaders to provide built-in uniforms etc.
The only thing I did was move ‘#extension GL_ARB_gpu_shader_fp64 : enable’ from the shader into the Preprocess Directives parameter. I know that it’s not as simple as that. What specific way do you have to reference the extension in this parameter?
Iv’e been searching but can’t find the right answer. I’m new to this area of Touch