diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-06-10 11:17:37 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-06-10 11:23:13 +0200 |
commit | 587d492a03275e95d518850d2e44949b73e1980e (patch) | |
tree | 3a2735de75757422ab57b1b0a96440de53c89683 | |
parent | 5162552e90c42afc5c7f8eda642e44debc67abcb (diff) |
wip
-rw-r--r-- | editor/imgui.cpp | 1 | ||||
-rw-r--r-- | shaders/lightmap.frag | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 5b02d134..ddbbc918 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -303,6 +303,7 @@ void app::kill_popups(bool hard) _pending_popup = false; _popup_target = {}; + _tested_light = 0; if (imgui) ImGui::CloseCurrentPopup(); diff --git a/shaders/lightmap.frag b/shaders/lightmap.frag index cba5a269..748be244 100644 --- a/shaders/lightmap.frag +++ b/shaders/lightmap.frag @@ -5,7 +5,7 @@ layout (location = 1) uniform vec2 center; layout (location = 2) uniform uint falloff; layout (location = 3) uniform vec2 size; -out vec3 color; +out vec4 color; void main() { vec2 pos = gl_FragCoord.xy; @@ -13,5 +13,5 @@ void main() { vec2 tmp = pos - center; float dist = sqrt(tmp.x*tmp.x + tmp.y*tmp.y); float alpha = 1 - min(1, dist / I); - color = alpha * color_intensity.xyz; + color = vec4(alpha * color_intensity.xyz, 1); } |