diff options
author | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-09-01 19:02:49 -0400 |
---|---|---|
committer | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-09-01 19:02:49 -0400 |
commit | eb028c960be2eeaee6e5177bc9c83a489e9209f2 (patch) | |
tree | 327579b9e7c5d3722fb67d15f3008022039f3df7 /Shaders | |
parent | 5fddf26cb8bf474b6649bd727bb6493f0c2c48ba (diff) |
THE CAT IS BACK
Diffstat (limited to 'Shaders')
-rw-r--r-- | Shaders/world.frag | 6 | ||||
-rw-r--r-- | Shaders/world.vert | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/Shaders/world.frag b/Shaders/world.frag index c23c923..ded3ec0 100644 --- a/Shaders/world.frag +++ b/Shaders/world.frag @@ -6,12 +6,12 @@ precision highp float; precision mediump float; #endif -//uniform sampler2D texture; +uniform sampler2D textu; -//in vec3 texCoord; +in vec2 texCoord; out vec4 FragColor; void main() { - FragColor = vec4(1.0, 0.0, 0.0, 1.0); + FragColor = texture(textu, texCoord); } diff --git a/Shaders/world.vert b/Shaders/world.vert index 795997a..743ff3d 100644 --- a/Shaders/world.vert +++ b/Shaders/world.vert @@ -2,14 +2,16 @@ //layout(location = 0)in vec3 vertex; in vec3 vertex; +in vec2 texc; uniform mat4 projection; uniform mat4 view; uniform mat4 model; -//out vec3 texCoord; +out vec2 texCoord; void main() { + texCoord = texc; gl_Position = projection * view * model * vec4(vertex, 1.0f); } |