ADDED: Support model normal matrix location #1691
This commit is contained in:
parent
2488d361b6
commit
cdc3754449
6 changed files with 18 additions and 13 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue