diff options
author | Jeroen Bakker <jbakker> | 2022-09-13 12:07:30 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-09-13 12:07:38 +0300 |
commit | 8068b89a681c467f3d449b9ddc2ebec5b817c2fc (patch) | |
tree | 2bed18be11a6b13ccd9092ea133993a19509a726 /source/blender/draw/engines/eevee_next/eevee_defines.hh | |
parent | bb3a021427f2132f1db62a76eeca2ca4be1601da (diff) |
EEVEE-Next: Cryptomatte render passes.
This change adds cryptomatte render passes to EEVEE-Next. Due to the upcoming viewport
compositor we also improved cryptomatte so it will be real-time. This also allows viewing
the cryptomatte passes in the viewport directly.
{F13482749}
A surface shader would store any active cryptomatte layer to a texture. Object hash is stored
as R, Asset hash as G and Material hash as B. Hashes are only calculated when the cryptomatte
layer is active to reduce any unneeded work.
During film accumulation the hashes are separated and stored in a texture array that matches
the cryptomatte standard. For the real-time use case sorting is skipped. For final rendering
the samples are sorted and normalized.
NOTE: Eventually we should also do sample normalization in the viewport in order to extract the correct
mask when using the viewport compositor.
Reviewed By: fclem
Maniphest Tasks: T99390
Differential Revision: https://developer.blender.org/D15753
Diffstat (limited to 'source/blender/draw/engines/eevee_next/eevee_defines.hh')
-rw-r--r-- | source/blender/draw/engines/eevee_next/eevee_defines.hh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee_next/eevee_defines.hh b/source/blender/draw/engines/eevee_next/eevee_defines.hh index 2f338e707c0..248dfae6df9 100644 --- a/source/blender/draw/engines/eevee_next/eevee_defines.hh +++ b/source/blender/draw/engines/eevee_next/eevee_defines.hh @@ -82,6 +82,7 @@ #define RBUFS_EMISSION_SLOT 4 #define RBUFS_AOV_COLOR_SLOT 5 #define RBUFS_AOV_VALUE_SLOT 6 +#define RBUFS_CRYPTOMATTE_SLOT 7 /* Uniform Buffers. */ /* Only during prepass. */ @@ -96,6 +97,8 @@ #define LIGHT_TILE_BUF_SLOT 3 #define RBUFS_AOV_BUF_SLOT 5 #define SAMPLING_BUF_SLOT 6 +#define CRYPTOMATTE_BUF_SLOT 7 + /* Only during pre-pass. */ #define VELOCITY_OBJ_PREV_BUF_SLOT 0 #define VELOCITY_OBJ_NEXT_BUF_SLOT 1 |