Added LOC_MATRIX_MODEL and LOC_VECTOR_VIEW to difference it from LOC_MATRIX_VIEW (view matrix)
This commit is contained in:
parent
e32f2e751b
commit
7345870d56
|
|
@ -1319,6 +1319,7 @@ Material LoadMaterialPBR(Texture2D hdr, Color albedo, float metalness, float rou
|
|||
mat.shader.locs[LOC_TEXMAP_BRDF] = GetShaderLocation(mat.shader, "brdfLUT");
|
||||
|
||||
// Set view matrix location
|
||||
mat.shader.locs[LOC_MATRIX_MODEL] = GetShaderLocation(mat.shader, "mMatrix");
|
||||
mat.shader.locs[LOC_MATRIX_VIEW] = GetShaderLocation(mat.shader, "view");
|
||||
mat.shader.locs[LOC_VECTOR_VIEW] = GetShaderLocation(mat.shader, "viewPos");
|
||||
|
||||
|
|
|
|||
|
|
@ -534,6 +534,7 @@ typedef enum {
|
|||
LOC_VERTEX_TANGENT,
|
||||
LOC_VERTEX_COLOR,
|
||||
LOC_MATRIX_MVP,
|
||||
LOC_MATRIX_MODEL,
|
||||
LOC_MATRIX_VIEW,
|
||||
LOC_MATRIX_PROJECTION,
|
||||
LOC_VECTOR_VIEW,
|
||||
|
|
|
|||
|
|
@ -2378,7 +2378,7 @@ void rlDrawMesh(Mesh mesh, Material material, Matrix transform)
|
|||
//-----------------------------------------------------
|
||||
|
||||
// Calculate and send to shader model matrix (used by PBR shader)
|
||||
SetShaderValueMatrix(material.shader, GetShaderLocation(material.shader, "mMatrix"), transform);
|
||||
SetShaderValueMatrix(material.shader, material.shader.locs[LOC_MATRIX_MODEL], transform);
|
||||
|
||||
|
||||
// Upload to shader material.colDiffuse
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ typedef unsigned char byte;
|
|||
LOC_VERTEX_TANGENT,
|
||||
LOC_VERTEX_COLOR,
|
||||
LOC_MATRIX_MVP,
|
||||
LOC_MATRIX_MODEL,
|
||||
LOC_MATRIX_VIEW,
|
||||
LOC_MATRIX_PROJECTION,
|
||||
LOC_VECTOR_VIEW,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user