diff options
author | sanine-a <sanine.not@pm.me> | 2020-05-21 10:16:59 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-05-21 10:16:59 -0500 |
commit | 8b7e8a1a3e77b4e3b56ea9025af8b254faa16c13 (patch) | |
tree | 3f39bb785d5f1df1f026589a6cc1aa2749e30e6d /demo.fs | |
parent | 9b66b322b600ab0db66cb6f3ff5a7c4196b9193f (diff) |
add textured cube primitive
Diffstat (limited to 'demo.fs')
-rw-r--r-- | demo.fs | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,10 +1,13 @@ #version 330 core -in vec4 color; +in vec2 texture_coordinate; + +uniform sampler2D box_texture; +uniform sampler2D happy_texture; out vec4 FragColor; void main() { - FragColor = color; + FragColor = mix(texture(box_texture, texture_coordinate), texture(happy_texture, vec2(1,1)-texture_coordinate), 0.2); } |