Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to setup a Mat4 from codea for a shader?

edited March 2013 in Questions Posts: 24

Hi,

I want to declare my own matrix in codea and bind it to a uniform mat4 in a shader, but it seens to be empty in the shader.
My code is basically:

m0={1,0,3,0,
         0,1,0,0,
         3,0,1,0,
         0,0,0,1}
Then I assign it to my shader ( in my vertex shader I have "uniform mat4 mymat4;" already declared)
mymesh.shader.mymat4=m0

But if I make any operation like position = mymat4* position, my result is null so I guess I have a problem with the input.
Anyone has an idea?

Thanks

Tagged:

Comments

Sign In or Register to comment.