[Mesa-stable] Pick c3ee464d7aa170225b5ec23b53a7f8d07663d428
Fabian Bieler
fabianbieler at fastmail.fm
Wed Dec 6 21:12:38 UTC 2017
commit c3ee464d7aa170225b5ec23b53a7f8d07663d428
Author: Fabian Bieler <fabianbieler at fastmail.fm>
Date: Thu Nov 23 13:48:00 2017 -0700
glsl: Fix gl_NormalScale.
GLSL shaders can access the normal scale factor with the built-in
gl_NormalScale. Mesa's modelspace lighting optimization uses a
different normal scale factor than defined in the spec. We have to take
care not to use this factor for gl_NormalScale.
Mesa already defines two seperate states: state.normalScale and
state.internal.normalScale. The first is used by the glsl compiler
while the later is used by the fixed function T&L pipeline. Previously
the only difference was some component swizzling. With this commit
state.normalScale always uses the normal scale factor for eyespace lighting.
Reviewed-by: Brian Paul <brianp at vmware.com>
---
Brian suggested to nominate this commit for the stable branch. I myself
am not sure if it's worth the hassle as it seems to me no one uses
gl_NormalScale.
More information about the mesa-stable
mailing list