[Bf-blender-cvs] [a1d9287ba01] temp-eevee-next-cryptomatte: Reduce local variables.

Jeroen Bakker noreply at git.blender.org
Tue Aug 23 13:57:23 CEST 2022


Commit: a1d9287ba01f9349560cbe6ff54de76b66ea6463
Author: Jeroen Bakker
Date:   Tue Aug 23 13:42:30 2022 +0200
Branches: temp-eevee-next-cryptomatte
https://developer.blender.org/rBa1d9287ba01f9349560cbe6ff54de76b66ea6463

Reduce local variables.

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

M	source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl

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

diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl
index 57d41a9e952..c77b7d51d43 100644
--- a/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl
+++ b/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl
@@ -706,16 +706,13 @@ void film_process_data(ivec2 texel_film, out vec4 out_color, out float out_depth
   if (film_buf.cryptomatte_samples_len != 0) {
     vec4 hashes = texelFetch(cryptomatte_tx, dst.texel, 0);
     if (film_buf.cryptomatte_object_id != -1) {
-      float hash = hashes.x;
-      film_store_cryptomatte_sample(dst, film_buf.cryptomatte_object_id, hash, out_color);
+      film_store_cryptomatte_sample(dst, film_buf.cryptomatte_object_id, hashes.x, out_color);
     }
     if (film_buf.cryptomatte_asset_id != -1) {
-      float hash = hashes.y;
-      film_store_cryptomatte_sample(dst, film_buf.cryptomatte_asset_id, hash, out_color);
+      film_store_cryptomatte_sample(dst, film_buf.cryptomatte_asset_id, hashes.y, out_color);
     }
     if (film_buf.cryptomatte_material_id != -1) {
-      float hash = hashes.z;
-      film_store_cryptomatte_sample(dst, film_buf.cryptomatte_material_id, hash, out_color);
+      film_store_cryptomatte_sample(dst, film_buf.cryptomatte_material_id, hashes.z, out_color);
     }
   }
 }



More information about the Bf-blender-cvs mailing list