Make QC run GLSL 1.5 so you can run geometry shaders as per OpenGL specification 3.2 or higher. That's if I've understood you correctly. Otherwise couldn't you work upon an objects vertices? [GL Tools Line Structure patch for instance]
I hadn't replied to your fb stat yet :-)... This gives more context.
There's a few issues...
QCStructure, is unique to QC. One way to look at it, is that it's kind of like a wrapper that can hold certain types of data.
GLSL is a cross platform technology. There's no such thing in GLSL as "QCStructure", which is unfortunate from the standpoint of ease of use.
QC does a little wedging to make GLSL work ok in the context of QC programming. For example, there's some niceties like being able to make a dedicated Color port, which is also a QC data type. (You can do that by writing uniform vec4 Color in your shader, or if you need multiple, you can do something like uniform vec4 a_Color, uniform vec4 b_Color, etc. A vec4 is still a GLSL data type though, and the there's other places in QC where a color data type converts to a vec4.)
So, there's no way to make a color port on a GLSL shader. Something like an NSUInteger, NSString, NSArray, NSDictionary, GFList, etc. (parts of QCStructure), doesn't mean anything in shader language, and there's no kind of conversion presented. I don't think there could legitimately be one, so the choice not to weld one on probably made sense.
With that particular shader, there are multiple things that would need to be changed; it's not programmed to have a dynamic structure count. I think what could be reasonably done to affect something like what you're talking about are to manually add more float inputs, and update all of the code to yield whatever result you're going for.
My other thought, is that you might be able to create a texture input on the shader, and use the r/g/b or r/g/b/a pixel intensities to control stuff in the shader, as if it was a structure. However, you're going to be limited in steps of resolution, and unless you recode the shader to work in a loop, it's not going to work if you change the texture w/h. You'll have to add your points in, update the equation, and keep your w/h static. It would be a little more natural if QC's GLSL supported 1D texture, but it does not.
but it does support a 2d texture.
I read somewhere Cwgrith telling about a 2d texture with a single line of pixels (1d) and the rest black or whatever. could that help?
Make QC run GLSL 1.5 so you can run geometry shaders as per OpenGL specification 3.2 or higher. That's if I've understood you correctly. Otherwise couldn't you work upon an objects vertices? [GL Tools Line Structure patch for instance]
yes cybero. i just want to input into the shader a structure(array) of values with xy coords to eval:
the frag shader
its from GToledo and inputs 4 points but I wann input a hole bunch of them LOL
I hadn't replied to your fb stat yet :-)... This gives more context.
There's a few issues...
QCStructure, is unique to QC. One way to look at it, is that it's kind of like a wrapper that can hold certain types of data.
GLSL is a cross platform technology. There's no such thing in GLSL as "QCStructure", which is unfortunate from the standpoint of ease of use.
QC does a little wedging to make GLSL work ok in the context of QC programming. For example, there's some niceties like being able to make a dedicated Color port, which is also a QC data type. (You can do that by writing uniform vec4 Color in your shader, or if you need multiple, you can do something like uniform vec4 a_Color, uniform vec4 b_Color, etc. A vec4 is still a GLSL data type though, and the there's other places in QC where a color data type converts to a vec4.)
So, there's no way to make a color port on a GLSL shader. Something like an NSUInteger, NSString, NSArray, NSDictionary, GFList, etc. (parts of QCStructure), doesn't mean anything in shader language, and there's no kind of conversion presented. I don't think there could legitimately be one, so the choice not to weld one on probably made sense.
With that particular shader, there are multiple things that would need to be changed; it's not programmed to have a dynamic structure count. I think what could be reasonably done to affect something like what you're talking about are to manually add more float inputs, and update all of the code to yield whatever result you're going for.
My other thought, is that you might be able to create a texture input on the shader, and use the r/g/b or r/g/b/a pixel intensities to control stuff in the shader, as if it was a structure. However, you're going to be limited in steps of resolution, and unless you recode the shader to work in a loop, it's not going to work if you change the texture w/h. You'll have to add your points in, update the equation, and keep your w/h static. It would be a little more natural if QC's GLSL supported 1D texture, but it does not.
but it does support a 2d texture. I read somewhere Cwgrith telling about a 2d texture with a single line of pixels (1d) and the rest black or whatever. could that help?