Fix T49372: Fresnel node: difference between 2.76 and 2.78 GLSL output

This commit is contained in:
Sergey Sharybin 2016-09-16 11:48:42 +02:00
parent 8909ff0e67
commit fc2b8c9793
1 changed files with 4 additions and 2 deletions

View File

@ -41,10 +41,12 @@ static bNodeSocketTemplate sh_node_fresnel_out[] = {
static int node_shader_gpu_fresnel(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
if (!in[1].link)
if (!in[1].link) {
in[1].link = GPU_builtin(GPU_VIEW_NORMAL);
else
}
else if (GPU_material_use_world_space_shading(mat)) {
GPU_link(mat, "direction_transform_m4v3", in[1].link, GPU_builtin(GPU_VIEW_MATRIX), &in[1].link);
}
return GPU_stack_link(mat, "node_fresnel", in, out, GPU_builtin(GPU_VIEW_POSITION));
}