Added texture and color support to default shaders.

This commit is contained in:
Harrison Deng 2020-02-17 02:26:12 -05:00
parent c62ec58c8f
commit 1a256eb664
2 changed files with 7 additions and 2 deletions

View File

@ -1,10 +1,10 @@
out vec4 outputColor; out vec4 outputColor;
in vec2 texCoord; in vec2 texCoord;
in vec4 color;
uniform sampler2D texture0; uniform sampler2D texture0;
void main() void main()
{ {
outputColor = texture(texture0, texCoord); outputColor = texture(texture0, texCoord) * color;
} }

View File

@ -1,6 +1,11 @@
#version 330 core #version 330 core
in vec3 aPosition; in vec3 aPosition;
in mat4 aTransform; in mat4 aTransform;
in vec2 aTexCoord;
in vec4 aColor;
out vec2 texCoord;
out vec4 color;
void main() void main()
{ {