diff options
| author | Ray <[email protected]> | 2019-04-05 16:43:09 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-04-05 16:43:09 +0200 |
| commit | c600dd07668f301fc1a986326d807f341e6ecb78 (patch) | |
| tree | 436bd51bfb4a3d0ee4521451883ffe40fec92782 /src/models.c | |
| parent | 0f9fe34c3a9228eaa3ffdb3be3f52ba586d1ddfa (diff) | |
| download | raylib-c600dd07668f301fc1a986326d807f341e6ecb78.tar.gz raylib-c600dd07668f301fc1a986326d807f341e6ecb78.zip | |
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.
Diffstat (limited to 'src/models.c')
| -rw-r--r-- | src/models.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/models.c b/src/models.c index e437a0ab..7a9acdf7 100644 --- a/src/models.c +++ b/src/models.c @@ -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"); } |
