From 30c8058fca39e4d6566b2fc06ae2498c48c00717 Mon Sep 17 00:00:00 2001 From: victorfisac Date: Fri, 20 May 2016 17:18:07 +0200 Subject: Add standard lighting (1/3) - Ambient and lambert lighting added. - Ambient and diffuse colors linked to standard shader. - Single light linked to standard shader. - LoadStandardMaterial() and depending functions added. --- src/models.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/models.c') diff --git a/src/models.c b/src/models.c index 414f6716..2629dffd 100644 --- a/src/models.c +++ b/src/models.c @@ -732,13 +732,13 @@ Material LoadDefaultMaterial(void) return material; } -// Load standard material (uses standard models shader) +// Load standard material (uses material attributes and lighting shader) // NOTE: Standard shader supports multiple maps and lights Material LoadStandardMaterial(void) { Material material = LoadDefaultMaterial(); - //material.shader = GetStandardShader(); + material.shader = GetStandardShader(); return material; } @@ -1240,7 +1240,7 @@ void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rota //Matrix matModel = MatrixMultiply(model.transform, matTransform); // Transform to world-space coordinates model.transform = MatrixMultiply(MatrixMultiply(matScale, matRotation), matTranslation); - model.material.colDiffuse = tint; + // model.material.colDiffuse = tint; rlglDrawMesh(model.mesh, model.material, model.transform); } -- cgit v1.2.3