I’m trying to port a shader #version 120 to #version 150, since I’m using the GL Programmable Renderer.
The standard functions and variable names are easy to translate.
However, the shader is using gl_FragData and I’m not being able to port it properly. I know it’s been deprecated since OpenGL 3.0 and that I need to use glBindFragDataLocation, but I’m not sure how to properly set it up in OF.
Anyone out there with experience in this topic?
I always appreciate any kind of help or comment from the OF community!
if i remember well you just need to define several variables in the fragment shader as out and each will go to a different target in the order they are defined. like:
out vec4 data0;
out vec4 data1;
....
but if that doesn’t work, you might need to compile the shader manually instead of using load and then before linking use glBindFragDataLocation for each of the out variables: