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:
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl')
-rw-r--r--source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl
index e288e1a55ea..9ed6ffa90c7 100644
--- a/source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl
+++ b/source/blender/draw/engines/eevee/shaders/effect_dof_lib.glsl
@@ -334,7 +334,15 @@ struct DofGatherData {
float layer_opacity;
};
-#define GATHER_DATA_INIT DofGatherData(vec4(0.0), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
+#ifdef GPU_METAL
+/* C++ struct initialization. */
+# define GATHER_DATA_INIT \
+ { \
+ vec4(0.0), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 \
+ }
+#else
+# define GATHER_DATA_INIT DofGatherData(vec4(0.0), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
+#endif
void dof_gather_ammend_weight(inout DofGatherData sample_data, float weight)
{