Fixed|Shaders: More accurate lighting, better specular highlights
This commit improves the way lighting is applied in the model shaders. The biggest issue was that light and eye directions were being mis-transformed -- now the normal vector is transformed from tangent space to model space, and lighting is calculated in model space.
A number of redundant calculations and unnecessary `varying` variables were removed.
Added shader variables uGlossiness and uReflectionBlur to control the shininess and reflection blurring of individual objects.
Fixed|Shaders: More accurate lighting, better specular highlights
This commit improves the way lighting is applied in the model shaders.
The biggest issue was that light and eye directions were being
mis-transformed -- now the normal vector is transformed from tangent
space to model space, and lighting is calculated in model space.
A number of redundant calculations and unnecessary `varying`
variables were removed.
Added shader variables uGlossiness and uReflectionBlur to control the
shininess and reflection blurring of individual objects.