# HG changeset patch # User František Kučera # Date 1701605617 -3600 # Node ID 1eb7cfefbeea094a920bdf0f65ec0630fa1c1610 # Parent ceeb36fad81841e639c0932dca241d56846793e8 transparency/alpha: blending diff -r ceeb36fad818 -r 1eb7cfefbeea Shark.cpp --- a/Shark.cpp Sun Dec 03 12:32:55 2023 +0100 +++ b/Shark.cpp Sun Dec 03 13:13:37 2023 +0100 @@ -272,6 +272,10 @@ glc = glXCreateContext(dpy, vi, NULL, GL_TRUE); glXMakeCurrent(dpy, win, glc); + glEnable(GL_DEPTH_TEST); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + clear(); glXSwapBuffers(dpy, win); diff -r ceeb36fad818 -r 1eb7cfefbeea shaders/default.frag --- a/shaders/default.frag Sun Dec 03 12:32:55 2023 +0100 +++ b/shaders/default.frag Sun Dec 03 13:13:37 2023 +0100 @@ -15,5 +15,5 @@ // fColor = grayscale(fColor); // fColor *= vec4(0.8, 1., 0.2, 1.); - if (fColor.a < 0.1) discard; + // if (fColor.a < 0.1) discard; }