diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-17 14:54:19 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-17 14:54:19 +0300 |
commit | e69192968616b17709e6a3bd0d2dc59d463c52ba (patch) | |
tree | 4018a1dc7f631ad340b11c0b738fade9f24d0c6e /intern/cycles/kernel/kernel_bake.h | |
parent | 0af22625c9f9357e873160d265b9eae4a43a549d (diff) | |
parent | 9d2397c710af9180e7e2ec6db42e8513390b4ab1 (diff) |
Merge branch 'blender2.7'
Diffstat (limited to 'intern/cycles/kernel/kernel_bake.h')
-rw-r--r-- | intern/cycles/kernel/kernel_bake.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h index 920b10086c5..37c163f2538 100644 --- a/intern/cycles/kernel/kernel_bake.h +++ b/intern/cycles/kernel/kernel_bake.h @@ -351,7 +351,7 @@ ccl_device void kernel_bake_evaluate(KernelGlobals *kg, ccl_global uint4 *input, out = make_float3(roughness, roughness, roughness); } else { - out = shader_emissive_eval(kg, &sd); + out = shader_emissive_eval(&sd); } break; } @@ -475,8 +475,9 @@ ccl_device void kernel_bake_evaluate(KernelGlobals *kg, ccl_global uint4 *input, shader_setup_from_background(kg, &sd, &ray); /* evaluate */ - int flag = 0; /* we can't know which type of BSDF this is for */ - out = shader_eval_background(kg, &sd, &state, flag); + int path_flag = 0; /* we can't know which type of BSDF this is for */ + shader_eval_surface(kg, &sd, &state, path_flag | PATH_RAY_EMISSION); + out = shader_background_eval(&sd); break; } default: @@ -554,8 +555,9 @@ ccl_device void kernel_background_evaluate(KernelGlobals *kg, shader_setup_from_background(kg, &sd, &ray); /* evaluate */ - int flag = 0; /* we can't know which type of BSDF this is for */ - float3 color = shader_eval_background(kg, &sd, &state, flag); + int path_flag = 0; /* we can't know which type of BSDF this is for */ + shader_eval_surface(kg, &sd, &state, path_flag | PATH_RAY_EMISSION); + float3 color = shader_background_eval(&sd); /* write output */ output[i] += make_float4(color.x, color.y, color.z, 0.0f); |