I'm trying to transform vertices with a shader program, but i can't understand the results. I prepared a projection, a view(trans), and model(trans) matrices:
First i have a vertex shader function of: viewproj * position. In a Objective-C program i start with identity multiplicated by a translation and projection matrices and then uniformed to viewproj. I can see geometry responding to a global translation, in perspective.
I would like to uniform matrices separately and operate all in shader. I uniform a proj, view(trans), model(trans), and try in shader: proj*view*model*position. But sems not well transformed (out representation?) Then i try to simply simulate my first transform. I uniform proj, and view, in shader i try with (view*proj)*position in order to do the same operation, but is'nt the view*proj done in C.
I'm using matrices described in columns 0-4 is first column. And with the structure defined in http://www.songho.ca/opengl/gl_transform.html#modelview
Now i don't know what i'm missing, wish that have a simple answer. If any one have a clue, thank you.
pd: Can i debug this shaders? ( XCode + iphoneos simulator )