Just a simple question, but confusing to ke anyway… I have this:
Lua
self.mesh.shader.mModel = modelMatrix()
self.mesh.shader.mView = viewMatrix()
self.mesh.shader.mProjection = projectionMatrix()
Vertexshader
uniform mat4 mModel;
uniform mat4 mView;
uniform mat4 mProjection;
...
void main()
{
...
mat4 mvp = mProjection * mView * mModel;
gl_Position = mvp * position;
// gl_Position = modelViewProjection * position;
}
I’m confused, because I thought my expression for mvp should be identical to the predefined modelViewProjection, but it isn’t working; my mesh isn’t showing at all.
Anyone knows how to accomplish this? Eventually I wanna scale the mModel*position coordinates.