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:
authorClément Foucault <foucault.clem@gmail.com>2018-10-17 13:17:56 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-10-17 13:18:06 +0300
commitc6eb5651ba26db3fa26179f2124c58f8c94b5ca3 (patch)
treec4388000fcb5eb551f6ef83cef0bcb2e55782f1b /source/blender/draw
parent53d152258e9fcaee2168a92e39df9c3a71b7f43a (diff)
Eevee: Fix error when using texture coordinate on world shaders
Compilation errors were happening on OSX with errors of the type: ```ERROR: Input of fragment shader 'viewNormal' not written by vertex shader```
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/engines/eevee/shaders/background_vert.glsl10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/background_vert.glsl b/source/blender/draw/engines/eevee/shaders/background_vert.glsl
index b81aae9bcda..c849a577316 100644
--- a/source/blender/draw/engines/eevee/shaders/background_vert.glsl
+++ b/source/blender/draw/engines/eevee/shaders/background_vert.glsl
@@ -17,4 +17,14 @@ void main()
gl_Position = vec4(pos, 1.0, 1.0);
varposition = viewPosition = vec3(pos, -1.0);
varnormal = normalize(-varposition);
+
+#ifndef VOLUMETRICS
+ /* Not used in practice but needed to avoid compilation errors. */
+ worldPosition = viewPosition;
+ worldNormal = viewNormal = varnormal;
+#endif
+
+#ifdef ATTRIB
+ pass_attrib(viewPosition);
+#endif
}