Bug 11009 - GL_NORMALIZE work incorrect after scale the modelview matrix
Summary: GL_NORMALIZE work incorrect after scale the modelview matrix
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other Linux (All)
: medium normal
Assignee: Eric Anholt
QA Contact:
Depends on:
Reported: 2007-05-20 19:29 UTC by WuNian
Modified: 2009-08-24 12:26 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

test case (2.00 KB, text/plain)
2007-05-20 19:29 UTC, WuNian

Note You need to log in before you can comment on or make changes to this bug.
Description WuNian 2007-05-20 19:29:05 UTC
When simply introduce a uniform scale to the modelview matrix, this scale should not affect lighting results if GL_NORMALIZE is enabled.
But now the light calculation is not correct if scale the modelview matrix when enable GL_NORMALIZE.
Comment 1 WuNian 2007-05-20 19:29:45 UTC
Created attachment 10047 [details]
test case

In test case, a polygon is drawn with lighting parameters set in such a way that most   values drop out and the resulting pixel color is a function  of the normal vector.

The equation reduces to c = max(0, n dot VP)  and (n dot VP) reduces to cos(theta). 

 Local light sources use the unit length vectors but have a w value of 1.0E-6.  Using the w value makes the local light so distant that it is an infinite light for all practical purposes.
Comment 2 Brian Paul 2007-05-21 08:04:51 UTC
Fixed in git.
Comment 3 WuNian 2007-07-02 22:37:45 UTC
commit: a8676c45ccab52117c70f2e90fd820d745261f51
Comment 4 WuNian 2007-07-17 01:04:25 UTC
This bug exists with i965 driver. Reopen to i965 component.
Comment 5 haihao 2007-08-31 01:44:16 UTC
fixed in git.
Comment 6 Adam Jackson 2009-08-24 12:26:54 UTC
Mass version move, cvs -> git

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.