Skip to content

Commit

Permalink
Fix USAGE_FOG for glsles, index values > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed Oct 29, 2019
1 parent 0023f34 commit 47dcadd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion profiles/mojoshader_profile_glsl.c
Expand Up @@ -951,7 +951,14 @@ void emit_GLSL_attribute(Context *ctx, RegisterType regtype, int regnum,
} // else if
break;
case MOJOSHADER_USAGE_FOG:
usage_str = "gl_FogFragCoord";
#if SUPPORT_PROFILE_GLSLES
if (support_glsles(ctx))
break; // GLSL ES does not have gl_FogFragCoord
#endif
if (index == 0)
{
usage_str = "gl_FogFragCoord";
} // if
break;
case MOJOSHADER_USAGE_TEXCOORD:
#if SUPPORT_PROFILE_GLSLES
Expand Down

0 comments on commit 47dcadd

Please sign in to comment.