aboutsummaryrefslogtreecommitdiff
path: root/voronoisplat.cpp
diff options
context:
space:
mode:
authorSamuel Fadel <samuel@nihil.ws>2023-06-06 16:58:40 +0200
committerSamuel Fadel <samuel@nihil.ws>2023-06-06 16:58:40 +0200
commit4ef37f16257b42512ec610cc5def338707308747 (patch)
treea00986754f6792a4b991a4927a9dc98f7b1919f7 /voronoisplat.cpp
parent4f05d891f05a038bad7b911ce52d27e01b34f7cb (diff)
BarChart, Wayland.
* Makefile: Added some Wayland stuff to cflags/libs in pkg-config * barchart: Rendering works, no interactivity * main.cpp: Reposition some components for a more compact view * manifest.scm: glfw-wayland: Added GLFW variant with Wayland * scatterplot.cpp and voronoisplat.cpp: Cleanup
Diffstat (limited to 'voronoisplat.cpp')
-rw-r--r--voronoisplat.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/voronoisplat.cpp b/voronoisplat.cpp
index 749ec42..e4a42cf 100644
--- a/voronoisplat.cpp
+++ b/voronoisplat.cpp
@@ -98,8 +98,6 @@ void main() {
vec2 point = gl_PointCoord - vec2(0.5, 0.5);
float d2 = dot(point, point);
float radius = rad_max + rad_blur;
- // float r = 2.0 * distance(gl_PointCoord, vec2(0.5, 0.5)) * radius;
- // float r2 = r * r;
float r2 = 4.0 * d2 * radius * radius;
float dt_blur = dt + rad_blur;
float dt_blur2 = dt_blur * dt_blur;
@@ -110,7 +108,6 @@ void main() {
fragColor = vec4(w * value, w, 0.0, 0.0);
}
}
- // fragColor = vec4(0.0, 0.0, 0.0, 0.0);
}
)EOF";
@@ -448,6 +445,7 @@ void VoronoiSplat::draw()
if (!m_redraw) {
return;
}
+ m_redraw = false;
int originalFBO;
glGetIntegerv(GL_FRAMEBUFFER_BINDING, &originalFBO);
@@ -519,7 +517,6 @@ void VoronoiSplat::draw()
*/
glBindFramebuffer(GL_FRAMEBUFFER, originalFBO);
- m_redraw = false;
}
// ----------------------------------------------------------------------------