Microsoft
Software
Hardware
Network
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_ModelViewProjectionMatr
ix works fine.
this is the shader code:
uniform mat4 modelViewProjectionMatrix;
void main(void){
// gl_Position = gl_ModelViewProjectionMatr
ix * gl_Vertex; // this works
gl_Position = modelViewProjectionMatrix * gl_Vertex; // this doesn't.
}
I'd much appreciate any insights.
Jochem
matrixcompare.jpg
(88 KB)
(File Type Details)
comparison of OpenGL matrix and handrolled Mat4
*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_ModelViewProjectionMatr
ix[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
Connect to customer's pc using free utils
laptop setup win 7 64bit with 32bit xp pro emulator
WDS Server 2008 R2 - PXE Error
MAC Os 10.4 Startup problem.
alignment question
howto eliminate duplicates in Exchange .ost file
keyboard shortcut for PrintScreen and SELECT in Paint
looking for a powerful ActionScript 3 isometric engine
Configuring Wireless Computer Authentication with Certificates in Windows 7
Small Business Server 2008, Exchange Setup