aboutsummaryrefslogtreecommitdiffstats
path: root/shader.frag
diff options
context:
space:
mode:
Diffstat (limited to 'shader.frag')
-rw-r--r--shader.frag8
1 files changed, 1 insertions, 7 deletions
diff --git a/shader.frag b/shader.frag
index 857c6b9..55527a1 100644
--- a/shader.frag
+++ b/shader.frag
@@ -5,16 +5,10 @@ uniform vec3 lightColor;
uniform float lightStrength;
uniform float screenHeight;
-uniform vec2 rayStart;
-uniform vec2 rayEnd;
-
-uniform sampler2D tex;
-uniform vec2 resolution;
-
void main(){
float distance = length(lightLocation - gl_FragCoord.xy);
float attenuation = lightStrength / distance;
- vec4 color = vec4(0, 0, 0, 0.8f - pow(attenuation, 3)) * vec4(lightColor, 1);
+ vec4 color = vec4(attenuation, attenuation, attenuation, (pow(attenuation, 3)) * vec4(lightColor, 2))+.5;
gl_FragColor = color;
}