[Bf-blender-cvs] [497c3eba661] temp-eevee-next-cryptomatte: renamed storage_type to display_storage_type nad use full enum name.

Jeroen Bakker noreply at git.blender.org
Mon Sep 12 08:48:42 CEST 2022


Commit: 497c3eba661680410ae0accffcb834b26e78e04f
Author: Jeroen Bakker
Date:   Mon Sep 12 08:48:38 2022 +0200
Branches: temp-eevee-next-cryptomatte
https://developer.blender.org/rB497c3eba661680410ae0accffcb834b26e78e04f

renamed storage_type to display_storage_type nad use full enum name.

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

M	source/blender/draw/engines/eevee_next/eevee_film.cc
M	source/blender/draw/engines/eevee_next/eevee_shader_shared.hh
M	source/blender/draw/engines/eevee_next/shaders/eevee_film_frag.glsl

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

diff --git a/source/blender/draw/engines/eevee_next/eevee_film.cc b/source/blender/draw/engines/eevee_next/eevee_film.cc
index 1e7ac790dfb..9d6b0a4dcbc 100644
--- a/source/blender/draw/engines/eevee_next/eevee_film.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_film.cc
@@ -291,7 +291,7 @@ void Film::init(const int2 &extent, const rcti *output_rect)
     /* Set pass offsets.  */
 
     data_.display_id = aovs_info.display_id;
-    data_.storage_type = aovs_info.display_is_value ? PASS_STORAGE_VALUE : PASS_STORAGE_COLOR;
+    data_.display_storage_type = aovs_info.display_is_value ? PASS_STORAGE_VALUE : PASS_STORAGE_COLOR;
 
     /* Combined is in a separate buffer. */
     data_.combined_id = (enabled_passes_ & EEVEE_RENDER_PASS_COMBINED) ? 0 : -1;
@@ -308,7 +308,7 @@ void Film::init(const int2 &extent, const rcti *output_rect)
                       -1;
       if (inst_.is_viewport() && inst_.v3d->shading.render_pass == pass_type) {
         data_.display_id = index;
-        data_.storage_type = storage_type;
+        data_.display_storage_type = storage_type;
       }
       return index;
     };
@@ -344,7 +344,7 @@ void Film::init(const int2 &extent, const rcti *output_rect)
 
         if (inst_.is_viewport() && inst_.v3d->shading.render_pass == pass_type) {
           data_.display_id = index;
-          data_.storage_type = PASS_STORAGE_CRYPTOMATTE;
+          data_.display_storage_type = PASS_STORAGE_CRYPTOMATTE;
         }
       }
       return index;
diff --git a/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh b/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh
index 553d499983b..76e48513c8c 100644
--- a/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh
+++ b/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh
@@ -261,8 +261,8 @@ struct FilmData {
   int combined_id;
   /** Id of the render-pass to be displayed. -1 for combined. */
   int display_id;
-  /** Storage type of the render-pass to be displayed (ePassStorageType). */
-  int storage_type;
+  /** Storage type of the render-pass to be displayed. */
+  ePassStorageType display_storage_type;
   /** True if we bypass the accumulation and directly output the accumulation buffer. */
   bool1 display_only;
   /** Start of AOVs and number of aov. */
diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_film_frag.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_film_frag.glsl
index 8e1ed77b639..e2aaf9128a5 100644
--- a/source/blender/draw/engines/eevee_next/shaders/eevee_film_frag.glsl
+++ b/source/blender/draw/engines/eevee_next/shaders/eevee_film_frag.glsl
@@ -13,11 +13,11 @@ void main()
     if (film_buf.display_id == -1) {
       out_color = texelFetch(in_combined_tx, texel_film, 0);
     }
-    else if (film_buf.storage_type == PASS_STORAGE_VALUE) {
+    else if (film_buf.display_storage_type == PASS_STORAGE_VALUE) {
       out_color.rgb = imageLoad(value_accum_img, ivec3(texel_film, film_buf.display_id)).rrr;
       out_color.a = 1.0;
     }
-    else if (film_buf.storage_type == PASS_STORAGE_COLOR) {
+    else if (film_buf.display_storage_type == PASS_STORAGE_COLOR) {
       out_color = imageLoad(color_accum_img, ivec3(texel_film, film_buf.display_id));
     }
     else /* PASS_STORAGE_CRYPTOMATTE */ {



More information about the Bf-blender-cvs mailing list