GLSL object space normal maps have wrong shading
Closed, InvalidPublic

Description

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 (Göran Maconi) added a comment.Via Old WorldJun 3 2011, 3:10 PM

This accidentally went into the wrong tracker, I think...
Trying to repost it in the right place

elubie (Andrea Weikert) added a comment.Via Old WorldSep 19 2013, 5:54 PM

Moved from Blender 2.4x Bug Tracker to Blender 2.6 Bug Tracker

elubie (Andrea Weikert) added a comment.Via Old WorldSep 19 2013, 5:54 PM

Moving to the 2.6 tracker since I confirmed that this behavior is likely still present.

elubie (Andrea Weikert) added a comment.Via Old WorldSep 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?

Thanks,
Andrea

elubie (Andrea Weikert) added a comment.Via Old WorldSep 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 (Brecht Van Lommel) added a comment.Via Old WorldSep 20 2013, 1:19 PM

Patch looks good to me, you can commit it, thanks.

elubie (Andrea Weikert) added a comment.Via Old WorldSep 20 2013, 1:57 PM

Fixed and committed, rev. 60261, thanks Brecht for reviewing

elubie (Andrea Weikert) closed this task as "Invalid".Via Old WorldSep 20 2013, 1:57 PM

Add Comment