From b659c412263f6dd7df962f7d42f4f51b7c3d5609 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Wed, 2 May 2018 21:22:03 +0100 Subject: Implement diffuse texture loading and basic material support --- frag.glsl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'frag.glsl') 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; -- cgit v1.2.3-54-g00ecf