[Bf-blender-cvs] [487fe5abfca] master: Cryptomatte: Incorrect Coverage with Volumetrics

Jeroen Bakker noreply at git.blender.org
Wed Feb 3 15:30:20 CET 2021


Commit: 487fe5abfcaa981d572df36bf0986181b8174298
Author: Jeroen Bakker
Date:   Wed Feb 3 15:27:52 2021 +0100
Branches: master
https://developer.blender.org/rB487fe5abfcaa981d572df36bf0986181b8174298

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 90948d67895..b47e8c5f081 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