gl_ModelViewMatrixInverse is defined in GLSL version 1.1. AFAIK there is no GLSL 1.1 implementation right now, not from ATI nor from nVidia. Maybe 3DLabs supports it.
If you don’t want to make different branches in your code for implementations that don’t support this yet, just invert the matrix yourself and pass as a uniform.
Originally posted by Corrail: gl_ModelViewMatrixInverse is defined in GLSL version 1.1. AFAIK there is no GLSL 1.1 implementation right now, not from ATI nor from nVidia. Maybe 3DLabs supports it.
ahh that explains why a few of the inverse/tranpose thingees weren’t recognized, though gl_ModelViewMatrixInverse does work (66.00 nvidia drivers) i use it to get the camera position
vec4 camera_pos = gl_ModelViewMatrixInverse[3];
gotta admit ive been having a few troubles though by passing in mat4 as uniforms with the 66.00 drivers
eg
Vertex info
Internal error: assembly compile error for vertex shader at offset 0:
– error message –
line 1, column 1: error: invalid vertex program header
Originally posted by Corrail: gl_ModelViewMatrixInverse is defined in GLSL version 1.1. AFAIK there is no GLSL 1.1 implementation right now, not from ATI nor from nVidia. Maybe 3DLabs supports it.
I can confirm that, 3DLabs cards (at least Realizm) has version 110 of GLSL (that means that has xxInverse and xxxInverseTranspose matrices (and all other 110 stuff))