]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
shit
authordrumsetmonkey <abelleisle@roadrunner.com>
Mon, 11 Jan 2016 12:38:27 +0000 (07:38 -0500)
committerdrumsetmonkey <abelleisle@roadrunner.com>
Mon, 11 Jan 2016 12:38:27 +0000 (07:38 -0500)
test.frag

index 3b11ebb9e49e593499e2fd6c265011a558550551..0bb64a69e478d3d2760d4c964158ff8ffd3126a7 100644 (file)
--- a/test.frag
+++ b/test.frag
@@ -4,19 +4,15 @@ uniform int numLight;
 uniform vec2 lightLocation[10];\r
 uniform vec3 lightColor;\r
 uniform float amb;\r
-// uniform float lightStrength;\r
-//uniform float screenHeight;\r
+\r
 void main(){\r
        vec4 color = vec4(0.0f,0.0f,0.0f,0.0f);\r
        for(int i = 0; i < numLight; i++){\r
                vec2 loc = lightLocation[i];\r
-               //if(loc.x == 0.0f) continue;\r
                float dist = length(loc - gl_FragCoord.xy);\r
                float attenuation=1.0/(1.0+0.01*dist+0.00000000001*dist*dist);\r
 \r
-               //vec4 color = vec4(1.0f,1.0f,1.0f,1.0f);\r
                color += vec4(attenuation, attenuation, attenuation, 1.0f) * vec4(lightColor, 1.0f);\r
-               //color = color + vec4((vec3(lightColor.r + amb, lightColor.g + amb, lightColor.b + amb)*0.25f),1.0f);\r
        }\r
        vec2 coords = gl_TexCoord[0].st;\r
        vec4 tex = texture2D(sampler, coords);\r