Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2016-10-20 21:23:17 +0300
committerDalai Felinto <dfelinto@gmail.com>2016-10-20 21:23:17 +0300
commit12c0394a4fe8e447710b726eed5cce682ed05e88 (patch)
tree74aaf2a6225e1e23afacb00a4d67c4d70a44e10e
parent06b5508073e53a50d2c8fc3c76c3104eb0077629 (diff)
parent4b046c530d3e14d7737c4770b9ae07942f4c6047 (diff)
Merge commit '4b046c530d3e14d7737c4770b9ae07942f4c6047' into pbr-merge
Conflicts: source/blender/nodes/shader/nodes/node_shader_fresnel.c
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_fresnel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_fresnel.c b/source/blender/nodes/shader/nodes/node_shader_fresnel.c
index 46c296717a4..c7da3b0e066 100644
--- a/source/blender/nodes/shader/nodes/node_shader_fresnel.c
+++ b/source/blender/nodes/shader/nodes/node_shader_fresnel.c
@@ -41,9 +41,10 @@ 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)) {
/* Convert to view space normal in case a Normal is plugged. This is because cycles uses world normals */
GPU_link(mat, "direction_transform_m4v3", in[1].link, GPU_builtin(GPU_VIEW_MATRIX), &in[1].link);
}