summaryrefslogtreecommitdiff
path: root/src/render/decorations
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2023-11-11 00:52:40 +0000
committerVaxry <vaxry@vaxry.net>2023-11-11 00:52:40 +0000
commite44d6de555da72bd45ebd01c1293d53ea2700d3f (patch)
tree19b42ec45750cbfe4bd8a9268940776c0a2317f0 /src/render/decorations
parent427153e86ad7070ea0e4d39f7fd348b8f720e055 (diff)
shadow: alpha treatment improvements
Diffstat (limited to 'src/render/decorations')
-rw-r--r--src/render/decorations/CHyprDropShadowDecoration.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render/decorations/CHyprDropShadowDecoration.cpp b/src/render/decorations/CHyprDropShadowDecoration.cpp
index 68a82c3a..ac6c5b43 100644
--- a/src/render/decorations/CHyprDropShadowDecoration.cpp
+++ b/src/render/decorations/CHyprDropShadowDecoration.cpp
@@ -150,8 +150,8 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D
// first, clear with black (fully transparent)
g_pHyprOpenGL->clear(CColor(0, 0, 0, 1));
- // render white shadow
- g_pHyprOpenGL->renderRoundedShadow(&fullBox, ROUNDING * pMonitor->scale, *PSHADOWSIZE * pMonitor->scale, CColor(1, 1, 1, 1), a);
+ // render white shadow with the alpha of the shadow color (otherwise we clear with alpha later and shit it to 2 bit)
+ g_pHyprOpenGL->renderRoundedShadow(&fullBox, ROUNDING * pMonitor->scale, *PSHADOWSIZE * pMonitor->scale, CColor(1, 1, 1, m_pWindow->m_cRealShadowColor.col().a), a);
// render black window box ("clip")
g_pHyprOpenGL->renderRect(&windowBox, CColor(0, 0, 0, 1.0), ROUNDING * pMonitor->scale);
@@ -159,7 +159,7 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D
alphaSwapFB.bind();
// alpha swap just has the shadow color. It will be the "texture" to render.
- g_pHyprOpenGL->clear(m_pWindow->m_cRealShadowColor.col());
+ g_pHyprOpenGL->clear(m_pWindow->m_cRealShadowColor.col().stripA());
LASTFB->bind();