[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: correct naming in PlayerBlurredBackground.frag
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Dec 3 21:55:28 UTC 2022
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
d30191c4 by Fatih Uzunoglu at 2022-12-03T21:11:26+00:00
qml: correct naming in PlayerBlurredBackground.frag
- - - - -
7ec9e48d by Fatih Uzunoglu at 2022-12-03T21:11:26+00:00
qml: ensure input alpha is 1.0 in PlayerBlurredBackground.frag
- - - - -
1 changed file:
- modules/gui/qt/player/qml/PlayerBlurredBackground.frag
Changes:
=====================================
modules/gui/qt/player/qml/PlayerBlurredBackground.frag
=====================================
@@ -64,14 +64,14 @@ uniform lowp sampler2D backgroundSource;
uniform lowp vec4 screenColor;
uniform lowp vec4 overlayColor;
-lowp vec4 toPremult(lowp vec4 color) {
+lowp vec4 fromPremult(lowp vec4 color) {
lowp vec4 result = vec4(0.0);
result.rgb = color.rgb / max(1.0/256.0, color.a);
result.a = color.a;
return result;
}
-lowp vec4 fromPremult(lowp vec4 color) {
+lowp vec4 toPremult(lowp vec4 color) {
lowp vec4 result = vec4(0.0);
result.rbg = color.rbg * color.a;
result.a = color.a;
@@ -108,13 +108,13 @@ lowp vec4 normal(lowp vec4 color1, lowp vec4 color2) {
void main() {
lowp vec4 result = vec4(0.0);
- lowp vec4 colorP = toPremult(texture2D(backgroundSource, qt_TexCoord0));
- lowp vec4 screenColorP = toPremult(screenColor);
- lowp vec4 overlayColorP = toPremult(overlayColor);
+ lowp vec4 colorP = fromPremult(texture2D(backgroundSource, qt_TexCoord0));
+ lowp vec4 screenColorP = fromPremult(screenColor);
+ lowp vec4 overlayColorP = fromPremult(overlayColor);
result = screen(colorP, screenColorP);
result = multiply(result, screenColorP);
result = normal(result, overlayColorP);
- gl_FragColor = fromPremult(result) * qt_Opacity;
+ gl_FragColor = vec4(result.rgb, 1.0) * qt_Opacity;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3d7b30a7a1b57a64d50055b7e60e33d6088ea1be...7ec9e48dfa42eb191a52a61fc9bf0825e2872161
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3d7b30a7a1b57a64d50055b7e60e33d6088ea1be...7ec9e48dfa42eb191a52a61fc9bf0825e2872161
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list