Question : not getting the modelviewprojectionmatrix in glsl vertex shader right

Hi there,

I'm having a bit of an issue with uploading my "own" modelviewprojectionmatrix
(mvpm) to a geometryshader. As you can see in attached screendump, my own
code generates the same mvpm as OpenGL, and uploading it to the shader also
works correctly, as I can tell by uploading the matrix with a specific color in the
translation component to the fragment shader and rendering a colored quad.

However, I can't for the life of me seem to get the geometryshader to output
the correct gl_Position. all seems to go to infinity (or somewhere else i can't see)
but only if i use my handrolled mvpm. using gl_ModelViewProjectionMatrix works fine.

this is the shader code:

uniform mat4 modelViewProjectionMatrix;

void main(void){
//      gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; // this works
      gl_Position = modelViewProjectionMatrix * gl_Vertex; // this doesn't.
}

I'd much appreciate any insights.

Jochem
 
comparison of OpenGL matrix and handrolled Mat4
329398
 


*update1* doing a binary search by hand for where the components of the
matrices diverge, i found that elements[1][2] differ by approx. |2.0|, but i really don't
understand why that would be, let alone what causes it.

if( abs( gl_ModelViewProjectionMatrix[1][2] - modelViewProjectionMatrix[1][2] ) > 2.03125 ){
      gl_Position = vec4( 0.0 );
}

*update2*

it's getting weird, I've now handcoded the mvpm into the shader (ie setting each value
of a mat4) and I get the erroneous result. BUT ALSO, i get the erroneous result with:

      gl_Position = gl_ModelViewMatrix * gl_ProjectionMatrix * gl_Vertex;

but, as stated,

      gl_Position = modelViewProjectionMatrix * gl_Vertex;

works fine. Am I looking at a driver/card bug here ??

J



Answer : not getting the modelviewprojectionmatrix in glsl vertex shader right

OK, You also have to set the WAN address of the Zywall to be DHCP.

Depending on the setup, the firewall may be blocking pings.

I would do a full reset of the zywall and see if that works,
Both your WAN and LAN side should be DHCP, and they have to be different subnets.

So the Zywall LAN ( private side ) needs to be set to 192.168.2.1
Random Solutions  
 
programming4us programming4us