Reputation: 31
Are gl_ModelViewProjectionMatrix and gl_NormalMatrix matrices (or similar forms) supported in OpenGL ES 2.0? That's computed automatically by GL, provided the modelview matrix and the initial matrix and then automatically passed to the vertex shader?
Thanks,
-Ilyes
Upvotes: 0
Views: 3075
Reputation: 1
gl_ModelViewProjectionMatrix, you can use ViewProjectMatrix uniformly send from the OpenGL application to the shader.
gl_NormalMatrix, try using WorldViewInverseTranspose again send uniformly from the application.
Upvotes: 0
Reputation: 56347
OpenGL ES 2.0 doesn't have any built-in matrices or variables (except for gl_Position), so you have to calculate them by yourself and upload them to the shader as uniform variables.
Upvotes: 1