summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/models/models_material_pbr.c2
-rw-r--r--examples/models/resources/shaders/pbr.vs6
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/models/models_material_pbr.c b/examples/models/models_material_pbr.c
index 33f13e2c..d50ef3da 100644
--- a/examples/models/models_material_pbr.c
+++ b/examples/models/models_material_pbr.c
@@ -122,7 +122,7 @@ static Material LoadMaterialPBR(Color albedo, float metalness, float roughness)
mat.shader.locs[LOC_MAP_BRDF] = GetShaderLocation(mat.shader, "brdfLUT");
// Set view matrix location
- mat.shader.locs[LOC_MATRIX_MODEL] = GetShaderLocation(mat.shader, "mMatrix");
+ mat.shader.locs[LOC_MATRIX_MODEL] = GetShaderLocation(mat.shader, "matModel");
mat.shader.locs[LOC_MATRIX_VIEW] = GetShaderLocation(mat.shader, "view");
mat.shader.locs[LOC_VECTOR_VIEW] = GetShaderLocation(mat.shader, "viewPos");
diff --git a/examples/models/resources/shaders/pbr.vs b/examples/models/resources/shaders/pbr.vs
index 885cb199..8bd3faa1 100644
--- a/examples/models/resources/shaders/pbr.vs
+++ b/examples/models/resources/shaders/pbr.vs
@@ -16,7 +16,7 @@ in vec4 vertexTangent;
// Input uniform values
uniform mat4 mvp;
-uniform mat4 mMatrix;
+uniform mat4 matModel;
// Output vertex attributes (to fragment shader)
out vec3 fragPosition;
@@ -31,10 +31,10 @@ void main()
vec3 vertexBinormal = cross(vertexNormal, vec3(vertexTangent));
// Calculate fragment normal based on normal transformations
- mat3 normalMatrix = transpose(inverse(mat3(mMatrix)));
+ mat3 normalMatrix = transpose(inverse(mat3(matModel)));
// Calculate fragment position based on model transformations
- fragPosition = vec3(mMatrix*vec4(vertexPosition, 1.0f));
+ fragPosition = vec3(matModel*vec4(vertexPosition, 1.0f));
// Send vertex attributes to fragment shader
fragTexCoord = vertexTexCoord;