This commit is contained in:
UjinT34 2026-04-26 19:52:15 +03:00
parent 1b441e97f8
commit f71905e13b
2 changed files with 11 additions and 2 deletions

View file

@ -34,6 +34,7 @@
#include "../managers/screenshare/ScreenshareManager.hpp"
#include "../notification/NotificationOverlay.hpp"
#include "errorOverlay/Overlay.hpp"
#include "helpers/Color.hpp"
#include "macros.hpp"
#include "pass/TexPassElement.hpp"
#include "pass/RectPassElement.hpp"
@ -1079,7 +1080,10 @@ void CHyprOpenGLImpl::renderRectWithDamageInternal(const CBox& box, const CHyprC
shader->setUniformMatrix3fv(SHADER_PROJ, 1, GL_TRUE, glMatrix.getMatrix());
// premultiply the color as well as we don't work with straight alpha
shader->setUniformFloat4(SHADER_COLOR, col.r * col.a, col.g * col.a, col.b * col.a, col.a);
const auto premultiplied = CHyprColor(col.r * col.a, col.g * col.a, col.b * col.a, col.a);
const auto converted = convertColor(premultiplied, DEFAULT_SRGB_IMAGE_DESCRIPTION, g_pHyprRenderer->workBufferImageDescription());
shader->setUniformFloat4(SHADER_COLOR, converted.r, converted.g, converted.b, converted.a);
shader->setUniformFloat4(SHADER_COLOR_SRGB, premultiplied.r, premultiplied.g, premultiplied.b, premultiplied.a);
CBox transformedBox = box;
transformedBox.transform(Math::wlTransformToHyprutils(Math::invertTransform(m_renderData.pMonitor->m_transform)), m_renderData.pMonitor->m_transformedSize.x,

View file

@ -7,6 +7,7 @@
precision highp float;
in vec4 v_color;
uniform vec4 colorSRGB;
#if USE_ROUNDING
uniform float radius;
uniform float roundingPower;
@ -28,6 +29,10 @@ void main() {
fragColor = pixColor;
#if USE_MIRROR
mirrorColor = fragColor;
#if USE_ROUNDING
mirrorColor = rounding(colorSRGB, radius, roundingPower, topLeft, fullSize);
#else
mirrorColor = colorSRGB;
#endif
#endif
}