[Bf-blender-cvs] [10e3b2dc8e5] master: Cryptomatte: Incorrect Coverage with Volumetrics

Jeroen Bakker noreply at git.blender.org
Wed Feb 3 15:29:19 CET 2021


Commit: 10e3b2dc8e5ed589cf89bc4e139e35a8a4f366a0
Author: Jeroen Bakker
Date:   Wed Feb 3 15:27:52 2021 +0100
Branches: master
https://developer.blender.org/rB10e3b2dc8e5ed589cf89bc4e139e35a8a4f366a0

Cryptomatte: Incorrect Coverage with Volumetrics

Related to {D10286}. When volumetrics are used in the scene the coverage
is incorrect. The reason is that the current sample is 1 over the num
samples that are calculated.

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

M	source/blender/draw/engines/eevee/eevee_cryptomatte.c

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

diff --git a/source/blender/draw/engines/eevee/eevee_cryptomatte.c b/source/blender/draw/engines/eevee/eevee_cryptomatte.c
index 31e54e371b1..13a3f1766a9 100644
--- a/source/blender/draw/engines/eevee/eevee_cryptomatte.c
+++ b/source/blender/draw/engines/eevee/eevee_cryptomatte.c
@@ -503,7 +503,7 @@ static void eevee_cryptomatte_postprocess_weights(EEVEE_Data *vedata)
     volumetric_transmittance_buffer = GPU_texture_read(
         txl->volume_transmittance_accum, GPU_DATA_FLOAT, 0);
   }
-  const int num_samples = effects->taa_current_sample;
+  const int num_samples = effects->taa_current_sample - 1;
 
   int accum_pixel_index = 0;
   int accum_pixel_stride = eevee_cryptomatte_pixel_stride(view_layer);



More information about the Bf-blender-cvs mailing list