summaryrefslogtreecommitdiffhomepage
path: root/src/models.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/models.c')
-rw-r--r--src/models.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/models.c b/src/models.c
index 9dfdc0ea..b0b54a21 100644
--- a/src/models.c
+++ b/src/models.c
@@ -1058,6 +1058,9 @@ void DrawMeshInstanced(Mesh mesh, Material material, Matrix *transforms, int ins
// transform: function parameter transformation
matModelView = MatrixMultiply(transforms[0], MatrixMultiply(rlGetMatrixTransform(), matView));
}
+
+ // Upload model normal matrix (if locations available)
+ if (material.shader.locs[SHADER_LOC_MATRIX_NORMAL] != -1) rlSetUniformMatrix(material.shader.locs[SHADER_LOC_MATRIX_NORMAL], MatrixTranspose(MatrixInvert(matModelView)));
//-----------------------------------------------------
// Bind active texture maps (if available)