Multiply a vec3 by modelview matrix
glsl, lwjgl, opengl, vector-graphics
Solution
No. gl_ModelViewMatrix is a mat4. You need to multiply it by a vec4 (with 1 in w).
Problem
I have a 3D coordinate I want to transform by the modelVeiw matrix to get into view space in a GLSL shader. The point is defined in the shader, and is not affected by OpenGL's transformations. Is there anyway to do something like gl_ModelViewMatrix*(vec3 name)?