Sending an array of vec2 to a pixel effect
Posted: Wed Aug 29, 2012 6:10 pm
Hello,
First of all, yesterday was the first day I ever touched to shader programming, so perhaps that what I want is not possible.
I would like to send an array of (say) 25 vec2 from Lua to a pixel effect. Looking at the löve API for send, there does not seem to be such a function, but the OpenGL doc on uniform variables says that uniforms can be of any type, and gives examples of arrays of matrices.
So my question is:
Is it possible to send an array of 25 vec2 from Lua to a shader?
Of course I can fake it and send 25 individual variables, but this is not pretty and has probably some performance issues.
Thank you
Fractal
First of all, yesterday was the first day I ever touched to shader programming, so perhaps that what I want is not possible.
I would like to send an array of (say) 25 vec2 from Lua to a pixel effect. Looking at the löve API for send, there does not seem to be such a function, but the OpenGL doc on uniform variables says that uniforms can be of any type, and gives examples of arrays of matrices.
So my question is:
Is it possible to send an array of 25 vec2 from Lua to a shader?
Of course I can fake it and send 25 individual variables, but this is not pretty and has probably some performance issues.
Thank you
Fractal