http://bugs.freedesktop.org/show_bug.cgi?id=17266

           Summary: gl_NormalMatrix definition is wrong
           Product: Mesa
           Version: CVS
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


gl_NormalMatrix, defined at line 84 of slang_builtin.c, in lookup_statevar() is
not defined correctly. The definition:

{ "gl_NormalMatrix", STATE_MODELVIEW_MATRIX, STATE_MATRIX_TRANSPOSE },

is same as for gl_ModelViewMatrix. However, the normal matrix is equal to the
3x3 top-left submatrix of the modelview matrix only if the modelview matrix is
orthogonal (i.e. its columns have length equal to 1.0). If the modelviewmatrix
is not orthogonal (i.e. scaling is applied), this does not hold.

The normal matrix should be computed as the inverse transpose of the top-left
3x3 submatrix of the modelview matrix, as described in section 2.11.3 of the
OpenGL 2.1 specification.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to