PDA

View Full Version : gl_ModelViewMatrixInverse matrix bug



Matt Zamborsky
04-25-2005, 06:36 AM
I'm developing on NV35(GF FX5900) and everything is well. But now I tested my app on ATI boards and what's the suprise. The lighting was simple wrong. I resolved this problem and it was in this:

vec3 Lpos = vec3(gl_ModelViewMatrixInverse * gl_LightSource[0].position)

on NV board it works fine but on ATI I'm supposed to do

vec3 Lpos = vec3(gl_LightSource[0].position *gl_ModelViewMatrixInverse)

which is the same as if I use transpose form of this matrix. So I think it's a bug(most possible in ATI driver) where you get inverse transpose instead of only inverse.

I tried it on Catalyst 5.4.

Has anybody got the same experience?

mogumbo
04-25-2005, 06:47 AM
Strangely enough, I had a similar problem using ARB_fp on ATI hardware where state.matrix.modelview and state.matrix.modelview.transpose were reversed. I believe they were correct in arb_vp. At some level in their driver software, it could be the same bug. I reported it many months ago, but last time I checked it hadn't been fixed.

Humus
04-27-2005, 03:49 AM
This is a known bug. The matrix appears to be transposed.

Matt Zamborsky
04-27-2005, 09:24 AM
Thank you, Humus for confirmation, maybe it's stupid question but (you work at ATi, am I right?) is here any place where can I find list of known bugs in latest ATi driver? It can be very useful.