Added support for color tinting

This commit is contained in:
viktorljung
2015-12-07 16:33:03 +01:00
parent 1df63aecd5
commit 9c589a0dc6
3 changed files with 8 additions and 16 deletions
+2 -1
View File
@@ -3,6 +3,7 @@
uniform mat4 M;
uniform mat4 V;
uniform mat4 P;
uniform vec4 Color;
uniform sampler2D texture0;
@@ -21,7 +22,7 @@ out vec4 fragmentColor;
void main()
{
vec4 texel = texture2D(texture0, Input.TextureCoordinate);
fragmentColor = texel * Input.DiffuseColor;
fragmentColor = texel * Input.DiffuseColor * Color;
}