Review PBR shaders

Issue was related to vertex tangent attibutes not uploaded to GPU, a quick solution was implemented for new vertex attributes loading for already existing meshes... I don't like it specially but it will work for now.
This commit is contained in:
Ray 2019-04-05 16:43:09 +02:00
parent 0f9fe34c3a
commit c600dd0766
6 changed files with 41 additions and 6 deletions

View file

@ -2302,6 +2302,9 @@ void MeshTangents(Mesh *mesh)
free(tan1);
free(tan2);
// Load a new tangent attributes buffer
mesh->vboId[LOC_VERTEX_TANGENT] = rlLoadAttribBuffer(mesh->vaoId, LOC_VERTEX_TANGENT, mesh->tangents, mesh->vertexCount*4*sizeof(float), false);
TraceLog(LOG_INFO, "Tangents computed for mesh");
}