From 16a8d0fab07513bcafb3f3bd09ac9c880638816b Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 25 Oct 2021 18:42:27 +0200 Subject: Cycles: change Position render pass to be not antialiased Similar to the Depth, for compositing the interpolated values between a far and near object can be non-sensical. --- intern/cycles/kernel/kernel_passes.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'intern') diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h index 4e4ffa68d25..ab8d7a26f44 100644 --- a/intern/cycles/kernel/kernel_passes.h +++ b/intern/cycles/kernel/kernel_passes.h @@ -231,12 +231,12 @@ ccl_device_inline void kernel_write_data_passes(KernelGlobals kg, const float id = shader_pass_id(kg, sd); kernel_write_pass_float(buffer + kernel_data.film.pass_material_id, id); } + if (flag & PASSMASK(POSITION)) { + const float3 position = sd->P; + kernel_write_pass_float3(buffer + kernel_data.film.pass_position, position); + } } - if (flag & PASSMASK(POSITION)) { - const float3 position = sd->P; - kernel_write_pass_float3(buffer + kernel_data.film.pass_position, position); - } if (flag & PASSMASK(NORMAL)) { const float3 normal = shader_bsdf_average_normal(kg, sd); kernel_write_pass_float3(buffer + kernel_data.film.pass_normal, normal); -- cgit v1.2.3