fix
This commit is contained in:
parent
df849d2fb0
commit
e957fcc288
|
|
@ -3436,7 +3436,8 @@ void GenMeshTangents(Mesh *mesh)
|
||||||
Vector3 *tan1 = (Vector3 *)RL_MALLOC(mesh->vertexCount*sizeof(Vector3));
|
Vector3 *tan1 = (Vector3 *)RL_MALLOC(mesh->vertexCount*sizeof(Vector3));
|
||||||
Vector3 *tan2 = (Vector3 *)RL_MALLOC(mesh->vertexCount*sizeof(Vector3));
|
Vector3 *tan2 = (Vector3 *)RL_MALLOC(mesh->vertexCount*sizeof(Vector3));
|
||||||
|
|
||||||
for (int i = 0; i < mesh->vertexCount - 3; i += 3)
|
assert(mesh->vertexCount % 3 == 0);
|
||||||
|
for (int i = 0; i <= mesh->vertexCount - 3; i += 3)
|
||||||
{
|
{
|
||||||
// Get triangle vertices
|
// Get triangle vertices
|
||||||
Vector3 v1 = { mesh->vertices[(i + 0)*3 + 0], mesh->vertices[(i + 0)*3 + 1], mesh->vertices[(i + 0)*3 + 2] };
|
Vector3 v1 = { mesh->vertices[(i + 0)*3 + 0], mesh->vertices[(i + 0)*3 + 1], mesh->vertices[(i + 0)*3 + 2] };
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user