- shaders for both lightmapped objects with or without albedo maps
[laserbrain_demo] / sdr / test.p.glsl
diff --git a/sdr/test.p.glsl b/sdr/test.p.glsl
deleted file mode 100644 (file)
index 87ca201..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* vi: set ft=glsl */
-uniform sampler2D texmap;
-uniform sampler2D lightmap;
-
-varying vec3 vdir, ldir[3], normal;
-
-//#define KD gl_FrontMaterial.diffuse.rgb
-#define KD vec3(1.0, 1.0, 1.0)
-
-#define KS gl_FrontMaterial.specular.rgb
-#define SPOW gl_FrontMaterial.shininess
-
-#define LD(i) gl_LightSource[i].diffuse.rgb
-#define LS(i) gl_LightSource[i].specular.rgb
-
-vec3 calc_diffuse(in vec3 n, in vec3 l, in vec3 lcol)
-{
-       float ndotl = max(dot(n, l), 0.0);
-       return KD * lcol * ndotl;
-}
-
-vec3 calc_specular(in vec3 n, in vec3 l, in vec3 v, in vec3 lcol)
-{
-       vec3 h = normalize(l + v);
-       float ndoth = max(dot(n, h), 0.0);
-       return KS * lcol * pow(ndoth, SPOW);
-}
-
-void main()
-{
-       vec3 texel = texture2D(texmap, gl_TexCoord[0].st).rgb;
-       vec3 lumel = texture2D(lightmap, gl_TexCoord[1].st).rgb;
-
-       vec3 n = normalize(normal);
-       vec3 v = normalize(vdir);
-
-       vec3 diffuse = lumel * texel * 1.8;
-       vec3 specular = vec3(0.0, 0.0, 0.0);
-
-       /*
-       for(int i=0; i<3; i++) {
-               vec3 l = normalize(ldir[i]);
-               diffuse += calc_diffuse(n, l, LD(i)) * texel;
-               specular += calc_specular(n, l, v, LS(i));
-       }
-       */
-
-       vec3 ambient = gl_LightModel.ambient.rgb * KD * texel;
-       gl_FragColor.rgb = ambient + diffuse;// + specular;
-       gl_FragColor.a = gl_FrontMaterial.diffuse.a;
-}