Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2022-09-02 12:33:33 +0300
committerJeroen Bakker <jeroen@blender.org>2022-09-02 12:33:33 +0300
commitc8ac1280bb7e69bffadff4cf8c8f71f9c0ec6616 (patch)
treea5722d52babe321d8577f9d8e2b8c2e44fcdcf67 /source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl
parent0a85288462def15bf8fedb04aaa6872a2c4dfd33 (diff)
EEVEE-Next: Move weight layer indexes to shader shared.
Upcoming cryptomatte patch would need access to these defines. So moving them from film_lib to shader shared. We cannot include the film_lib as it requires images/textures to be bound that we don't need. At the same time fixes incorrect casing (`lAYER` => `LAYER`).
Diffstat (limited to 'source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl')
-rw-r--r--source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl11
1 files changed, 4 insertions, 7 deletions
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 964c078036b..087efa9100d 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
@@ -164,9 +164,6 @@ void film_sample_accum_combined(FilmSample samp, inout vec4 accum, inout float w
/** \name Load/Store Data
* \{ */
-#define WEIGHT_lAYER_ACCUMULATION 0
-#define WEIGHT_lAYER_DISTANCE 1
-
/* Returns the distance used to store nearest interpolation data. */
float film_distance_load(ivec2 texel)
{
@@ -176,7 +173,7 @@ float film_distance_load(ivec2 texel)
if (!film_buf.use_history || film_buf.use_reprojection) {
return 1.0e16;
}
- return imageLoad(in_weight_img, ivec3(texel, WEIGHT_lAYER_DISTANCE)).x;
+ return imageLoad(in_weight_img, ivec3(texel, FILM_WEIGHT_LAYER_DISTANCE)).x;
}
float film_weight_load(ivec2 texel)
@@ -187,7 +184,7 @@ float film_weight_load(ivec2 texel)
if (!film_buf.use_history || film_buf.use_reprojection) {
return 0.0;
}
- return imageLoad(in_weight_img, ivec3(texel, WEIGHT_lAYER_ACCUMULATION)).x;
+ return imageLoad(in_weight_img, ivec3(texel, FILM_WEIGHT_LAYER_ACCUMULATION)).x;
}
/* Returns motion in pixel space to retrieve the pixel history. */
@@ -550,12 +547,12 @@ void film_store_depth(ivec2 texel_film, float value, out float out_depth)
void film_store_distance(ivec2 texel, float value)
{
- imageStore(out_weight_img, ivec3(texel, WEIGHT_lAYER_DISTANCE), vec4(value));
+ imageStore(out_weight_img, ivec3(texel, FILM_WEIGHT_LAYER_DISTANCE), vec4(value));
}
void film_store_weight(ivec2 texel, float value)
{
- imageStore(out_weight_img, ivec3(texel, WEIGHT_lAYER_ACCUMULATION), vec4(value));
+ imageStore(out_weight_img, ivec3(texel, FILM_WEIGHT_LAYER_ACCUMULATION), vec4(value));
}
float film_display_depth_ammend(ivec2 texel, float depth)