Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
For SM1.1 TEX, don't add texcoord attributes.
Other parts of the system will generate the tX registers as global
variables, assign gl_TexCoord[X] to them, and overwrite them with the
sampled pixels during the TEX instruction. Setting these as texcoord
attributes causes it to _also_ generate a generic vertex attribute and
cause all sorts of problems.
  • Loading branch information
icculus committed Jul 20, 2020
1 parent f467eba commit 1d735fd
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mojoshader.c
Expand Up @@ -1937,8 +1937,6 @@ static void state_TEXLD(Context *ctx)
if (info->regtype != REG_TYPE_TEXTURE)
fail(ctx, "TEX param must be a texture register");
add_sampler(ctx, sampler, TEXTURE_TYPE_2D, 0);
add_attribute_register(ctx, REG_TYPE_TEXTURE, sampler,
MOJOSHADER_USAGE_TEXCOORD, sampler, 0xF, 0);
} // else
} // state_TEXLD

Expand Down

0 comments on commit 1d735fd

Please sign in to comment.