GLSL object space normal maps have wrong shading
Closed, InvalidPublic

While object space normal maps work perfectly in blender internal, the GLSL preview renders them wrong. The bug is probably caused by an incorrect coordinate space transformation, resulting in lighting that changes depending on the view angle. This problem has been present ever since glsl viewport rendering was implemented in 2.4x and is still present.
The problem appears on any graphics card I have tested (geforce 8600 gt, gtx 260, gtx 460, gt 320, radeon hd 4770, hd 4870) so it's obviously not driver-related.

World space normal maps also have exactly the same problem.

Attached a simple example scene.
jorzi created this task. · May 31 2011, 6:43 PM
jorzi set Type to Bug.
jorzi added a comment. · Jun 3 2011, 3:10 PM
This accidentally went into the wrong tracker, I think...
Trying to repost it in the right place
elubie added a comment. · Sep 19 2013, 5:54 PM
Moved from Blender 2.4x Bug Tracker to Blender 2.6 Bug Tracker
elubie added a comment. · Sep 19 2013, 5:54 PM
Moving to the 2.6 tracker since I confirmed that this behavior is likely still present.
elubie added a comment. · Sep 20 2013, 9:03 AM
I am looking into this bug
Hi Brecht,

I fixed this issue, could you take a quick look at the attached patch before I commit?

elubie added a comment. · Sep 20 2013, 9:28 AM
To reproduce the bug, open the attached .blend from Göran and put the 3D view into GLSL shading mode, you will see that the faces are not correctly lit according to the light direction.
brecht added a comment. · Sep 20 2013, 1:19 PM
Patch looks good to me, you can commit it, thanks.
elubie added a comment. · Sep 20 2013, 1:57 PM
Fixed and committed, rev. 60261, thanks Brecht for reviewing
elubie closed this task as "Invalid". · Sep 20 2013, 1:57 PM

Add Comment