[Mesa-dev] [Bug 28577] New: Incorrect specular highlights on backfaces

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jun 16 17:36:48 PDT 2010


https://bugs.freedesktop.org/show_bug.cgi?id=28577

           Summary: Incorrect specular highlights on backfaces
           Product: Mesa
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa-dev at lists.freedesktop.org
        ReportedBy: t.evans at aranz.com


Created an attachment (id=36323)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=36323)
Test code that reproduces the problem

When rendering faces with:
 * glLightModeli (GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
 * glLightModeli (GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
 * glLightModeli (GL_LIGHT_MODEL_LOCAL_VIEWER, GL_FALSE);
 * A infinite distance light.

The specular colour is applied incorrectly to backward faces. The faces show up
as the correct colour when they don't have a specular highlight, but as
full-intensity white when they have any specular.

Without separate specular the results are correct.

With local-viewer set to true, or with a non-infinite distance light, the
results are better but still wrong. The specular highlight doesn't go to full
white instantly but it's still brighter than it should be.

I'm attaching some simple code to reproduce the problem. It should show a red
and green square rotating on a blue background. As the square rotates the
correct specular highlight will show up on the red front face: a gradual
lightening from red to pink then back to red again. The green back face instead
goes instantly from green to white, then instantly back to green again.

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


More information about the mesa-dev mailing list