Skip to content
Browse files
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 1d735fd921a9d3f7fa3e038d0ea159b2efd9eb09
Showing with 0 additions and 2 deletions.
  1. +0 −2 mojoshader.c
@@ -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,
} // else
} // state_TEXLD

0 comments on commit 1d735fd

Please sign in to comment.