summaryrefslogtreecommitdiffhomepage
path: root/shaders/lightmap.frag
diff options
context:
space:
mode:
Diffstat (limited to 'shaders/lightmap.frag')
-rw-r--r--shaders/lightmap.frag3
1 files changed, 2 insertions, 1 deletions
diff --git a/shaders/lightmap.frag b/shaders/lightmap.frag
index 748be244..eb7ed789 100644
--- a/shaders/lightmap.frag
+++ b/shaders/lightmap.frag
@@ -11,7 +11,8 @@ void main() {
vec2 pos = gl_FragCoord.xy;
float I = color_intensity.w;
vec2 tmp = pos - center;
+ //float dist = sqrt(tmp.x*tmp.x + tmp.y*tmp.y);
float dist = sqrt(tmp.x*tmp.x + tmp.y*tmp.y);
float alpha = 1 - min(1, dist / I);
- color = vec4(alpha * color_intensity.xyz, 1);
+ color = vec4(color_intensity.xyz, alpha);
}