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@lists.freedesktop.org
        ReportedBy: t.ev...@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.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to