diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-06-10 13:20:04 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-06-10 13:20:04 +0200 |
| commit | 2204f113710319ae6d735e3d511dd1d75d42a07d (patch) | |
| tree | d21bb92cddf4c511239a773efc54f9aa94935b2b /shaders/lightmap.frag | |
| parent | 587d492a03275e95d518850d2e44949b73e1980e (diff) | |
wip
Diffstat (limited to 'shaders/lightmap.frag')
| -rw-r--r-- | shaders/lightmap.frag | 3 |
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); } |
