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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-21 12:32:48 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-21 12:39:04 +0300
commitc8fc23fdbe09c33f5342ed51735dab50fe4f071b (patch)
tree37be47af8dd6709687135f38e621aa99211752ce /source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl
parent93c19a5a2cf58b75aa3072ce79de5e5d571f3d55 (diff)
Fix T63698: Eevee crash after recent clang-format changes
Some GLSL compilers seem to not have problems with \ to break preprocessor directives. I couldn't find other places with similar code, but fixing this case by case is not ideal and the same issue may come up again.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl')
-rw-r--r--source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl
index fdaec58977f..9ed0ab9a5d4 100644
--- a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl
+++ b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl
@@ -870,8 +870,10 @@ Closure closure_emission(vec3 rgb)
return cl;
}
-# if defined(MESH_SHADER) && !defined(USE_ALPHA_HASH) && !defined(USE_ALPHA_CLIP) && \
- !defined(SHADOW_SHADER) && !defined(USE_MULTIPLY)
+/* Breaking this across multiple lines causes issues for some older GLSL compilers. */
+/* clang-format off */
+# if defined(MESH_SHADER) && !defined(USE_ALPHA_HASH) && !defined(USE_ALPHA_CLIP) && !defined(SHADOW_SHADER) && !defined(USE_MULTIPLY)
+/* clang-format on */
layout(location = 0) out vec4 fragColor;
layout(location = 1) out vec4 ssrNormals;
layout(location = 2) out vec4 ssrData;