Added tint color attribute to material data type

It tints all fragments, ignores lighting. Useful for some features like
feedback (damage color, ...).
This commit is contained in:
victorfisac 2016-05-30 19:55:13 +02:00
parent f2d61d4043
commit b0a0c5d431
4 changed files with 7 additions and 1 deletions

View file

@ -1793,6 +1793,9 @@ void rlglDrawMesh(Mesh mesh, Material material, Matrix transform)
// Setup shader uniforms for lights
SetShaderLights(material.shader);
// Upload to shader material.colSpecular
glUniform4f(glGetUniformLocation(material.shader.id, "colTint"), (float)material.colTint.r/255, (float)material.colTint.g/255, (float)material.colTint.b/255, (float)material.colTint.a/255);
// Upload to shader material.colAmbient
glUniform4f(glGetUniformLocation(material.shader.id, "colAmbient"), (float)material.colAmbient.r/255, (float)material.colAmbient.g/255, (float)material.colAmbient.b/255, (float)material.colAmbient.a/255);