aboutsummaryrefslogtreecommitdiffstats
path: root/frag.glsl
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2018-05-02 21:22:03 +0100
committerTomasz Kramkowski <tk@the-tk.com>2018-05-02 21:22:03 +0100
commitb659c412263f6dd7df962f7d42f4f51b7c3d5609 (patch)
treee2495e0b1446527b909a9c9fa2776797c7c28221 /frag.glsl
parentec93a8eddf70adef2b1439a511d990021ad25d99 (diff)
downloadfaqe-b659c412263f6dd7df962f7d42f4f51b7c3d5609.tar.gz
faqe-b659c412263f6dd7df962f7d42f4f51b7c3d5609.tar.xz
faqe-b659c412263f6dd7df962f7d42f4f51b7c3d5609.zip
Implement diffuse texture loading and basic material support
Diffstat (limited to 'frag.glsl')
-rw-r--r--frag.glsl5
1 files changed, 4 insertions, 1 deletions
diff --git a/frag.glsl b/frag.glsl
index 4a5e869..5aa26d8 100644
--- a/frag.glsl
+++ b/frag.glsl
@@ -4,11 +4,14 @@
out vec4 color;
in vec3 vnorm;
in vec3 fpos;
+in vec2 fuv;
in vec3 lipos;
+uniform sampler2D tex;
+
void main()
{
- vec3 objco = vec3(1.0, 0.5, 0.31);
+ vec3 objco = vec3(texture(tex, fuv));
vec3 lico = vec3(1.0, 1.0, 1.0);
float amb = 0.1;