From 587d492a03275e95d518850d2e44949b73e1980e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 10 Jun 2023 11:17:37 +0200 Subject: wip --- editor/imgui.cpp | 1 + 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); } -- cgit v1.2.3