Skip to content

Commit

Permalink
Change to only write the KHR_texture_transform's texcoord if it's act…
Browse files Browse the repository at this point in the history
…ually provided.
  • Loading branch information
jkuhlmann committed Sep 8, 2021
1 parent a92412b commit a86b359
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cgltf_write.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,10 @@ static void cgltf_write_texture_transform(cgltf_write_context* context, const cg
{
cgltf_write_floatarrayprop(context, "scale", transform->scale, 2);
}
cgltf_write_intprop(context, "texCoord", transform->texcoord, 0);
if (transform->has_texcoord)
{
cgltf_write_intprop(context, "texCoord", transform->texcoord, -1);
}
cgltf_write_line(context, "}");
cgltf_write_line(context, "}");
}
Expand Down

0 comments on commit a86b359

Please sign in to comment.