Commit: c6eb5651ba26db3fa26179f2124c58f8c94b5ca3
Author: Clément Foucault
Date:   Wed Oct 17 12:17:56 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBc6eb5651ba26db3fa26179f2124c58f8c94b5ca3

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```

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

M       source/blender/draw/engines/eevee/shaders/background_vert.glsl

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

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
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to