[Bf-blender-cvs] [142ef237398] temp-eevee-next-cryptomatte: Added design comments.
Jeroen Bakker
noreply at git.blender.org
Wed Aug 10 14:46:44 CEST 2022
Commit: 142ef23739894a356715f3d7950b8534f7da17a0
Author: Jeroen Bakker
Date: Wed Aug 10 14:46:22 2022 +0200
Branches: temp-eevee-next-cryptomatte
https://developer.blender.org/rB142ef23739894a356715f3d7950b8534f7da17a0
Added design comments.
===================================================================
M source/blender/draw/engines/eevee_next/shaders/eevee_cryptomatte_lib.glsl
===================================================================
diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_cryptomatte_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_cryptomatte_lib.glsl
index 2f2a9b2ee74..5699be9da23 100644
--- a/source/blender/draw/engines/eevee_next/shaders/eevee_cryptomatte_lib.glsl
+++ b/source/blender/draw/engines/eevee_next/shaders/eevee_cryptomatte_lib.glsl
@@ -4,8 +4,19 @@ void film_store_cryptomatte_sample(FilmSample dst, int cryptomatte_layer_id, flo
float weight = dst.weight;
/*
first need to detect the operation.
- - when hash exists it should be updated and can optionally be moved to a new position.
+ - when hash exists it should be updated and can optionally be reinserted into a new position.
- when hash doesn't exist we should find an insertion point. only samples to a null sample (hash 0, weight 0) should be moved. When no null sample exist it will remove the lowest weight.
+
+ Second option would be to find the place to fit the sample. Doing the sorting in a separate shader
+ pro is that the performance when adding samples. Sorting only happens once during
+ final rendering. When using the viewport compositor this shader could be called
+ as a post process for active layers.
+
+ perhaps in the viewport the first option would fit better. The second option
+ is better for final rendering, but at that time performance is secondary.
+ Technically the order of the samples don't matter that much, But it depends on how many
+ cryptomatte nodes are used to make sorting more efficient.
+ Would need some feedback from Beau/Andy on this subject.
*/
int operation = 0;
More information about the Bf-blender-cvs
mailing list