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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2017-10-30 19:19:37 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-11-08 00:35:12 +0300
commitd0af56fe3b6490445ba3e501b0fb98cfec622aa3 (patch)
tree09d8c1b4a25bc48561eb28df949bee486a6573ec /intern/cycles/kernel
parentff34e489117e0a9f64ca192438d05f28922af6cc (diff)
Cycles: antialias normal baking if the mesh has a bump map.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r--intern/cycles/kernel/kernel_bake.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h
index 9ce10358b81..5cb32545c6e 100644
--- a/intern/cycles/kernel/kernel_bake.h
+++ b/intern/cycles/kernel/kernel_bake.h
@@ -172,17 +172,6 @@ ccl_device_inline void compute_light_pass(KernelGlobals *kg,
path_radiance_accum_sample(L, &L_sample);
}
-ccl_device bool is_aa_pass(ShaderEvalType type)
-{
- switch(type) {
- case SHADER_EVAL_UV:
- case SHADER_EVAL_NORMAL:
- return false;
- default:
- return true;
- }
-}
-
/* this helps with AA but it's not the real solution as it does not AA the geometry
* but it's better than nothing, thus committed */
ccl_device_inline float bake_clamp_mirror_repeat(float u, float max)
@@ -485,10 +474,10 @@ ccl_device void kernel_bake_evaluate(KernelGlobals *kg, ccl_global uint4 *input,
}
/* write output */
- const float output_fac = is_aa_pass(type)? 1.0f/num_samples: 1.0f;
+ const float output_fac = 1.0f/num_samples;
const float4 scaled_result = make_float4(out.x, out.y, out.z, 1.0f) * output_fac;
- output[i] = (sample == 0)? scaled_result: output[i] + scaled_result;
+ output[i] = (sample == 0)? scaled_result: output[i] + scaled_result;
}
#endif /* __BAKING__ */