Skip to content
Commit 07da9fd9 authored by Fabian Bieler's avatar Fabian Bieler Committed by Emil Velikov
Browse files

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: default avatarBrian Paul <brianp@vmware.com>
(cherry picked from commit c3ee464d)
parent fe15da82
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment