aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-11-25 18:50:27 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-11-25 18:50:27 -0500
commitb40db01d8902dc99b92c9953dc237e6390238f96 (patch)
tree35a906e0adfedd88c9cd2b80079c41acfcde452d
parent947043437bbfee45f8105c1b84c4710aace454bd (diff)
BURNED FRIGFRAG
-rw-r--r--frig.frag34
1 files changed, 0 insertions, 34 deletions
diff --git a/frig.frag b/frig.frag
deleted file mode 100644
index b291ddf..0000000
--- a/frig.frag
+++ /dev/null
@@ -1,34 +0,0 @@
-#version 120
-uniform sampler2D sampler;
-
-uniform int numLight;
-uniform vec2 lightLocation[64];
-uniform float fireFlicker[64];
-uniform vec3 lightColor;
-uniform float amb;
-
-float b = .0005f;
-float minLight = .05f;
-float radius = sqrt(1.0f / (b * minLight));
-//float radius = b*minlight;
-
-float rand(vec2 co){
- return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
-}
-
-void main(){
- vec4 color = vec4(0.0f, 0.0f, 0.0f, 0.0f);
- for(int i = 0; i < numLight; i++){
- vec2 loc = lightLocation[i];
- float dist = length(loc - gl_FragCoord.xy);
- //float attenuation=1.0/(1.0+0.01*dist+0.00000000001*dist*dist);
- float attenuation = clamp(1.0f - dist*dist/(radius*radius), 0.0f, 1.0f); attenuation *= attenuation;
-
- color += vec4(attenuation, attenuation, attenuation, 1.0f) * vec4(lightColor, 1.0f) * fireFlicker[i];
- }
- vec2 coords = gl_TexCoord[0].st;
- vec4 tex = texture2D(sampler, coords);
-
- color += vec4(amb,amb,amb,1.0f+amb);
- gl_FragColor = tex * vec4(color)*tex.a;
-}