Skip to content
Snippets Groups Projects
Commit fb451f14 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix macOS shader linking for alpha blend materials

parent e0e1e9fb
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,10 @@ uniform mat4 modelview_projection_matrix;
#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND)
// forwards
void setAtmosAttenuation(vec3 c);
void setAdditiveColor(vec3 c);
#if !defined(HAS_SKIN)
uniform mat4 modelview_matrix;
#endif
......@@ -137,6 +141,10 @@ vary_normal = n;
vertex_color = diffuse_color;
#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_BLEND)
// appease OSX GLSL compiler/linker by touching all the varyings we said we would
setAtmosAttenuation(vec3(1));
setAdditiveColor(vec3(0));
#if !defined(HAS_SKIN)
vary_position = (modelview_matrix*vec4(position.xyz, 1.0)).xyz;
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment