Fix T47670: cycles GLSL incorrect layer weight / fresnel.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 5 Mar 2016 13:29:32 +0000 (14:29 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 5 Mar 2016 13:33:41 +0000 (14:33 +0100)
commit002deb29cbc2fe1045189aef42bf61785c614cb8
tree17801b030551090637c92345465850d0976d6468
parent40b748d40f7efddbd07f35081a3264215025ffb8
Fix T47670: cycles GLSL incorrect layer weight / fresnel.

World space and view space normals were mixed up, we should only convert from
world to view space if a custom normal is connected, otherwise it is already in
view space.
13 files changed:
source/blender/gpu/shaders/gpu_shader_material.glsl
source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c
source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.c
source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c
source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c
source/blender/nodes/shader/nodes/node_shader_bsdf_refraction.c
source/blender/nodes/shader/nodes/node_shader_bsdf_toon.c
source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.c
source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.c
source/blender/nodes/shader/nodes/node_shader_bump.c
source/blender/nodes/shader/nodes/node_shader_fresnel.c
source/blender/nodes/shader/nodes/node_shader_layer_weight.c
source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c