--- /dev/null
+#version 450
+
+uniform sampler2D tex;
+
+uniform vec4 diffuse;
+uniform vec4 specular;
+uniform float shininess;
+
+varying vec3 pos;
+varying vec3 normal;
+varying vec3 ldir;
+varying vec3 tex_coord;
+
+layout(location = 0) out vec4 color;
+
+void main()
+{
+ vec3 p = normalize(pos);
+ vec3 n = normalize(normal);
+ vec3 l = normalize(ldir);
+
+ vec3 r = normalize(-reflect(l, n));
+ vec3 vdir = normalize(-p);
+
+ float cdiff = max(dot(l, n), 0.0);
+ float cspec = pow(max(dot(r, vdir), 0.0), shininess);
+
+ color = diffuse * cdiff * texture2D(tex, tex_coord.xy) + specular * cspec;
+}
--- /dev/null
+#version 450
+//#extension GL_ARB_separate_shader_objects : enable
+
+uniform mat4 mview;
+uniform mat4 mproj;
+
+varying vec3 pos;
+varying vec3 normal;
+varying vec3 ldir;
+varying vec3 tex_coord;
+
+const vec3 lpos = vec3(0.0, 100.0, 0.0);
+
+/* attributes */
+layout(location = 1) in vec3 attr_pos;
+layout(location = 2) in vec3 attr_normal;
+layout(location = 3) in vec3 attr_tex;
+
+void main()
+{
+ mat4 modelview_projection_matrix = mproj * mview;
+ gl_Position = modelview_projection_matrix * vec4(attr_pos, 1.0);
+
+ pos = (mview * vec4(attr_pos, 1.0)).xyz;
+ ldir = (mview * vec4(lpos, 1.0)).xyz;
+
+ mat3 normal_matrix = mat3(mview);
+ normal = normal_matrix * attr_normal;
+ tex_coord = attr_tex;
+}