[Bf-blender-cvs] [16a8d0fab07] master: Cycles: change Position render pass to be not antialiased

Brecht Van Lommel noreply at git.blender.org
Tue Oct 26 14:57:04 CEST 2021


Commit: 16a8d0fab07513bcafb3f3bd09ac9c880638816b
Author: Brecht Van Lommel
Date:   Mon Oct 25 18:42:27 2021 +0200
Branches: master
https://developer.blender.org/rB16a8d0fab07513bcafb3f3bd09ac9c880638816b

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.

===================================================================

M	intern/cycles/kernel/kernel_passes.h

===================================================================

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);



More information about the Bf-blender-cvs mailing list