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```
This commit is contained in:
parent
53d152258e
commit
c6eb5651ba
Notes:
blender-bot
2023-02-14 10:04:50 +01:00
Referenced by issue #57302, Viewport (selection etc) not updated while rendering (F12) Referenced by issue #56292, Switching to face select crashes Blender 2.8
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue