Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Applet is not rendering anything #18

Open
tam1m opened this issue Jan 11, 2025 · 0 comments
Open

[BUG] Applet is not rendering anything #18

tam1m opened this issue Jan 11, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@tam1m
Copy link

tam1m commented Jan 11, 2025

System information:

  • OS Archlinux
  • Version of Plasma Framework 6.9.0

Describe the bug
The applet isn't rendering anything. When running it with plasmoidviewer --applet=panon it produces an error Failed to build graphics pipeline state

Any error message shown in the console

QML debugging is enabled. Only use this in a safe environment.
kf.plasma.quick: Applet preload policy set to 1
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:178:25: QML FolderViewDropArea (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "minimumWidth":
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/main.qml:201:9
Toolbox not loading, toolbox package is either invalid or disabled.
file:///usr/share/plasma/plasmoids/panon/contents/ui/main.qml:9:5: Unable to assign [undefined] to QQmlComponent*
file:///usr/share/plasma/plasmoids/panon/contents/ui/main.qml:9:5: Unable to assign [undefined] to QQmlComponent*
file:///usr/share/plasma/plasmoids/panon/contents/ui/Spectrum.qml:184: TypeError: Cannot read property 'textColor' of undefined
file:///usr/share/plasma/plasmoids/panon/contents/ui/Spectrum.qml:95:45: QML Image: Cannot open file:///: Path is a directory
qt.qml.context: file:///usr/share/plasma/plasmoids/panon/contents/ui/WsConnection.qml:67:9 Parameter "data" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
ShaderEffect: 'source' does not have a matching property
ShaderEffect: 'source' does not have a matching property
qt.qml.context: file:///usr/share/plasma/plasmoids/panon/contents/ui/ShaderSource.qml:36:5 Parameter "data" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
ShaderEffect: 'iDate' does not have a matching property
Failed to compile shader: 0(5) : error C7516: OpenGL does not allow constant arrays
0(5) : error C7553: OpenGL array assignments require #version 120
0(6) : error C7516: OpenGL does not allow constant arrays
0(6) : error C7553: OpenGL array assignments require #version 120

Source was:
#version 100
precision highp float;
precision highp int;

const float _556[5] = float[](4.0, 3.0, 2.0, 1.0, 0.5);
const float _561[5] = float[](0.100000001490116119384765625, 0.20000000298023223876953125, 0.300000011920928955078125, 0.5, 1.0);
vec3 _524;
vec2 _696;

struct _data
{
    mat4 qt_Matrix;
    float qt_Opacity;
    vec3 iResolution;
    float iTime;
    float iTimeDelta;
    float iBeat;
    int iFrame;
    vec3 iChannelResolution0;
    vec3 iChannelResolution1;
    vec3 iChannelResolution2;
    vec3 iChannelResolution3;
    vec4 iMouse;
    vec4 iDate;
    int colorSpaceHSL;
    int colorSpaceHSLuv;
    int hueFrom;
    int hueTo;
    int saturation;
    int lightness;
    int coord_gravity;
    int coord_inversion;
};

uniform _data _455;

uniform highp sampler2D iChannel1;
uniform highp sampler2D iChannel0;
uniform highp sampler2D iChannel2;
uniform highp sampler2D iChannel3;

varying vec2 qt_TexCoord0;

vec2 getCoord()
{
    for (int spvDummy178 = 0; spvDummy178 < 1; spvDummy178++)
    {
        if (_455.coord_gravity == 1)
        {
            float _625;
            if (_455.coord_inversion != 0)
            {
                _625 = 1.0 - qt_TexCoord0.x;
            }
            else
            {
                _625 = qt_TexCoord0.x;
            }
            return vec2(_625, 1.0 - qt_TexCoord0.y);
        }
        else if (_455.coord_gravity == 2)
        {
            float _646;
            if (_455.coord_inversion != 0)
            {
                _646 = 1.0 - qt_TexCoord0.x;
            }
            else
            {
                _646 = qt_TexCoord0.x;
            }
            return vec2(_646, qt_TexCoord0.y);
        }
        else if (_455.coord_gravity == 3)
        {
            float _663;
            if (_455.coord_inversion != 0)
            {
                _663 = qt_TexCoord0.y;
            }
            else
            {
                _663 = 1.0 - qt_TexCoord0.y;
            }
            return vec2(_663, 1.0 - qt_TexCoord0.x);
        }
        else if (_455.coord_gravity == 4)
        {
            float _681;
            if (_455.coord_inversion != 0)
            {
                _681 = qt_TexCoord0.y;
            }
            else
            {
                _681 = 1.0 - qt_TexCoord0.y;
            }
            return vec2(_681, qt_TexCoord0.x);
        }
    }
}

vec3 hsv2rgb(vec3 c)
{
    vec4 K = vec4(1.0, 0.666666686534881591796875, 0.3333333432674407958984375, 3.0);
    vec3 p = abs((fract(c.xxx + K.xyz) * 6.0) - K.www);
    return mix(K.xxx, clamp(p - K.xxx, vec3(0.0), vec3(1.0)), vec3(c.y)) * c.z;
}

vec3 hsluv_lengthOfRayUntilIntersect(float theta, vec3 x, vec3 y)
{
    vec3 len = y / (vec3(sin(theta)) - (x * cos(theta)));
    if (len.x < 0.0)
    {
        len.x = 1000.0;
    }
    if (len.y < 0.0)
    {
        len.y = 1000.0;
    }
    if (len.z < 0.0)
    {
        len.z = 1000.0;
    }
    return len;
}

float hsluv_maxChromaForLH(float L, float H)
{
    float hrad = radians(H);
    mat3 m2 = mat3(vec3(3.2409698963165283203125, -0.96924364566802978515625, 0.055630080401897430419921875), vec3(-1.53738319873809814453125, 1.875967502593994140625, -0.2039769589900970458984375), vec3(-0.4986107647418975830078125, 0.0415550582110881805419921875, 1.05697154998779296875));
    float sub1 = pow(L + 16.0, 3.0) / 1560896.0;
    float _139;
    if (sub1 > 0.008856452070176601409912109375)
    {
        _139 = sub1;
    }
    else
    {
        _139 = L / 903.29632568359375;
    }
    float sub2 = _139;
    vec3 top1 = ((m2[0] * 284517.0) - (m2[2] * 94839.0)) * sub2;
    vec3 bottom = ((m2[2] * 632260.0) - (m2[1] * 126452.0)) * sub2;
    vec3 top2 = ((((m2[2] * 838422.0) + (m2[1] * 769860.0)) + (m2[0] * 731718.0)) * L) * sub2;
    vec3 bound0x = top1 / bottom;
    vec3 bound0y = top2 / bottom;
    vec3 bound1x = top1 / (bottom + vec3(126452.0));
    vec3 bound1y = (top2 - vec3(769860.0 * L)) / (bottom + vec3(126452.0));
    float param = hrad;
    vec3 param_1 = bound0x;
    vec3 param_2 = bound0y;
    vec3 lengths0 = hsluv_lengthOfRayUntilIntersect(param, param_1, param_2);
    float param_3 = hrad;
    vec3 param_4 = bound1x;
    vec3 param_5 = bound1y;
    vec3 lengths1 = hsluv_lengthOfRayUntilIntersect(param_3, param_4, param_5);
    return min(lengths0.x, min(lengths1.x, min(lengths0.y, min(lengths1.y, min(lengths0.z, lengths1.z)))));
}

vec3 hsluvToLch(inout vec3 tuple)
{
    float param = tuple.z;
    float param_1 = tuple.x;
    tuple.y *= (hsluv_maxChromaForLH(param, param_1) * 0.00999999977648258209228515625);
    return tuple.zyx;
}

vec3 lchToLuv(vec3 tuple)
{
    float hrad = radians(tuple.z);
    return vec3(tuple.x, cos(hrad) * tuple.y, sin(hrad) * tuple.y);
}

float hsluv_lToY(float L)
{
    float _292;
    if (L <= 8.0)
    {
        _292 = L / 903.29632568359375;
    }
    else
    {
        _292 = pow((L + 16.0) / 116.0, 3.0);
    }
    return _292;
}

vec3 luvToXyz(vec3 tuple)
{
    float L = tuple.x;
    float U = (tuple.y / (13.0 * L)) + 0.19783000648021697998046875;
    float V = (tuple.z / (13.0 * L)) + 0.4683199822902679443359375;
    float param = L;
    float Y = hsluv_lToY(param);
    float X = ((2.25 * U) * Y) / V;
    float Z = (((3.0 / V) - 5.0) * Y) - (X / 3.0);
    return vec3(X, Y, Z);
}

float hsluv_fromLinear(float c)
{
    float _257;
    if (c <= 0.003130800090730190277099609375)
    {
        _257 = 12.9200000762939453125 * c;
    }
    else
    {
        _257 = (1.05499994754791259765625 * pow(c, 0.4166666567325592041015625)) - 0.054999999701976776123046875;
    }
    return _257;
}

vec3 hsluv_fromLinear(vec3 c)
{
    float param = c.x;
    float param_1 = c.y;
    float param_2 = c.z;
    return vec3(hsluv_fromLinear(param), hsluv_fromLinear(param_1), hsluv_fromLinear(param_2));
}

vec3 xyzToRgb(vec3 tuple)
{
    vec3 param = tuple * mat3(vec3(3.2409698963165283203125, -1.53738319873809814453125, -0.4986107647418975830078125), vec3(-0.96924364566802978515625, 1.875967502593994140625, 0.0415550582110881805419921875), vec3(0.055630080401897430419921875, -0.2039769589900970458984375, 1.05697154998779296875));
    return hsluv_fromLinear(param);
}

vec3 lchToRgb(vec3 tuple)
{
    vec3 param = tuple;
    vec3 param_1 = lchToLuv(param);
    vec3 param_2 = luvToXyz(param_1);
    return xyzToRgb(param_2);
}

vec3 hsluvToRgb(vec3 tuple)
{
    vec3 param = tuple;
    vec3 _411 = hsluvToLch(param);
    vec3 param_1 = _411;
    return lchToRgb(param_1);
}

vec3 getRGB(float x)
{
    if (_455.colorSpaceHSL != 0)
    {
        vec3 param = vec3(((x * float(_455.hueTo - _455.hueFrom)) / 360.0) + (float(_455.hueFrom) / 360.0), float(_455.saturation) / 100.0, float(_455.lightness) / 100.0);
        return hsv2rgb(param);
    }
    else
    {
        if (_455.colorSpaceHSLuv != 0)
        {
            vec3 param_1 = vec3((x * float(_455.hueTo - _455.hueFrom)) + float(_455.hueFrom), float(_455.saturation), float(_455.lightness));
            return hsluvToRgb(param_1);
        }
    }
}

void mainImage(out vec4 fragColor, inout vec2 fragCoord)
{
    fragCoord /= _455.iResolution.xy;
    vec4 sample1 = texture2D(iChannel1, vec2(fragCoord.x, 0.0));
    float h = fragCoord.y;
    float param = fragCoord.x;
    vec3 rgb = getRGB(param);
    fragColor = vec4(0.001000000047497451305389404296875);
    for (int i = 0; i < 5; i++)
    {
        float r = _556[i];
        float a = _561[i];
        float max_ = 0.5 + (sample1.x * r);
        float min_ = 0.5 - (sample1.y * r);
        if ((min_ <= h) && (h <= max_))
        {
            fragColor = vec4(rgb * a, a);
        }
    }
}

void main()
{
    vec2 param_1 = floor(getCoord() * _455.iResolution.xy);
    vec4 param;
    mainImage(param, param_1);
    gl_FragData[0] = param;
}


Failed to build graphics pipeline state
Failed to compile shader: 0(5) : error C7516: OpenGL does not allow constant arrays
0(5) : error C7553: OpenGL array assignments require #version 120
0(6) : error C7516: OpenGL does not allow constant arrays
0(6) : error C7553: OpenGL array assignments require #version 120

Source was:
#version 100
precision highp float;
precision highp int;

const float _556[5] = float[](4.0, 3.0, 2.0, 1.0, 0.5);
const float _561[5] = float[](0.100000001490116119384765625, 0.20000000298023223876953125, 0.300000011920928955078125, 0.5, 1.0);
vec3 _524;
vec2 _696;

struct _data
{
    mat4 qt_Matrix;
    float qt_Opacity;
    vec3 iResolution;
    float iTime;
    float iTimeDelta;
    float iBeat;
    int iFrame;
    vec3 iChannelResolution0;
    vec3 iChannelResolution1;
    vec3 iChannelResolution2;
    vec3 iChannelResolution3;
    vec4 iMouse;
    vec4 iDate;
    int colorSpaceHSL;
    int colorSpaceHSLuv;
    int hueFrom;
    int hueTo;
    int saturation;
    int lightness;
    int coord_gravity;
    int coord_inversion;
};

uniform _data _455;

uniform highp sampler2D iChannel1;
uniform highp sampler2D iChannel0;
uniform highp sampler2D iChannel2;
uniform highp sampler2D iChannel3;

varying vec2 qt_TexCoord0;

vec2 getCoord()
{
    for (int spvDummy178 = 0; spvDummy178 < 1; spvDummy178++)
    {
        if (_455.coord_gravity == 1)
        {
            float _625;
            if (_455.coord_inversion != 0)
            {
                _625 = 1.0 - qt_TexCoord0.x;
            }
            else
            {
                _625 = qt_TexCoord0.x;
            }
            return vec2(_625, 1.0 - qt_TexCoord0.y);
        }
        else if (_455.coord_gravity == 2)
        {
            float _646;
            if (_455.coord_inversion != 0)
            {
                _646 = 1.0 - qt_TexCoord0.x;
            }
            else
            {
                _646 = qt_TexCoord0.x;
            }
            return vec2(_646, qt_TexCoord0.y);
        }
        else if (_455.coord_gravity == 3)
        {
            float _663;
            if (_455.coord_inversion != 0)
            {
                _663 = qt_TexCoord0.y;
            }
            else
            {
                _663 = 1.0 - qt_TexCoord0.y;
            }
            return vec2(_663, 1.0 - qt_TexCoord0.x);
        }
        else if (_455.coord_gravity == 4)
        {
            float _681;
            if (_455.coord_inversion != 0)
            {
                _681 = qt_TexCoord0.y;
            }
            else
            {
                _681 = 1.0 - qt_TexCoord0.y;
            }
            return vec2(_681, qt_TexCoord0.x);
        }
    }
}

vec3 hsv2rgb(vec3 c)
{
    vec4 K = vec4(1.0, 0.666666686534881591796875, 0.3333333432674407958984375, 3.0);
    vec3 p = abs((fract(c.xxx + K.xyz) * 6.0) - K.www);
    return mix(K.xxx, clamp(p - K.xxx, vec3(0.0), vec3(1.0)), vec3(c.y)) * c.z;
}

vec3 hsluv_lengthOfRayUntilIntersect(float theta, vec3 x, vec3 y)
{
    vec3 len = y / (vec3(sin(theta)) - (x * cos(theta)));
    if (len.x < 0.0)
    {
        len.x = 1000.0;
    }
    if (len.y < 0.0)
    {
        len.y = 1000.0;
    }
    if (len.z < 0.0)
    {
        len.z = 1000.0;
    }
    return len;
}

float hsluv_maxChromaForLH(float L, float H)
{
    float hrad = radians(H);
    mat3 m2 = mat3(vec3(3.2409698963165283203125, -0.96924364566802978515625, 0.055630080401897430419921875), vec3(-1.53738319873809814453125, 1.875967502593994140625, -0.2039769589900970458984375), vec3(-0.4986107647418975830078125, 0.0415550582110881805419921875, 1.05697154998779296875));
    float sub1 = pow(L + 16.0, 3.0) / 1560896.0;
    float _139;
    if (sub1 > 0.008856452070176601409912109375)
    {
        _139 = sub1;
    }
    else
    {
        _139 = L / 903.29632568359375;
    }
    float sub2 = _139;
    vec3 top1 = ((m2[0] * 284517.0) - (m2[2] * 94839.0)) * sub2;
    vec3 bottom = ((m2[2] * 632260.0) - (m2[1] * 126452.0)) * sub2;
    vec3 top2 = ((((m2[2] * 838422.0) + (m2[1] * 769860.0)) + (m2[0] * 731718.0)) * L) * sub2;
    vec3 bound0x = top1 / bottom;
    vec3 bound0y = top2 / bottom;
    vec3 bound1x = top1 / (bottom + vec3(126452.0));
    vec3 bound1y = (top2 - vec3(769860.0 * L)) / (bottom + vec3(126452.0));
    float param = hrad;
    vec3 param_1 = bound0x;
    vec3 param_2 = bound0y;
    vec3 lengths0 = hsluv_lengthOfRayUntilIntersect(param, param_1, param_2);
    float param_3 = hrad;
    vec3 param_4 = bound1x;
    vec3 param_5 = bound1y;
    vec3 lengths1 = hsluv_lengthOfRayUntilIntersect(param_3, param_4, param_5);
    return min(lengths0.x, min(lengths1.x, min(lengths0.y, min(lengths1.y, min(lengths0.z, lengths1.z)))));
}

vec3 hsluvToLch(inout vec3 tuple)
{
    float param = tuple.z;
    float param_1 = tuple.x;
    tuple.y *= (hsluv_maxChromaForLH(param, param_1) * 0.00999999977648258209228515625);
    return tuple.zyx;
}

vec3 lchToLuv(vec3 tuple)
{
    float hrad = radians(tuple.z);
    return vec3(tuple.x, cos(hrad) * tuple.y, sin(hrad) * tuple.y);
}

float hsluv_lToY(float L)
{
    float _292;
    if (L <= 8.0)
    {
        _292 = L / 903.29632568359375;
    }
    else
    {
        _292 = pow((L + 16.0) / 116.0, 3.0);
    }
    return _292;
}

vec3 luvToXyz(vec3 tuple)
{
    float L = tuple.x;
    float U = (tuple.y / (13.0 * L)) + 0.19783000648021697998046875;
    float V = (tuple.z / (13.0 * L)) + 0.4683199822902679443359375;
    float param = L;
    float Y = hsluv_lToY(param);
    float X = ((2.25 * U) * Y) / V;
    float Z = (((3.0 / V) - 5.0) * Y) - (X / 3.0);
    return vec3(X, Y, Z);
}

float hsluv_fromLinear(float c)
{
    float _257;
    if (c <= 0.003130800090730190277099609375)
    {
        _257 = 12.9200000762939453125 * c;
    }
    else
    {
        _257 = (1.05499994754791259765625 * pow(c, 0.4166666567325592041015625)) - 0.054999999701976776123046875;
    }
    return _257;
}

vec3 hsluv_fromLinear(vec3 c)
{
    float param = c.x;
    float param_1 = c.y;
    float param_2 = c.z;
    return vec3(hsluv_fromLinear(param), hsluv_fromLinear(param_1), hsluv_fromLinear(param_2));
}

vec3 xyzToRgb(vec3 tuple)
{
    vec3 param = tuple * mat3(vec3(3.2409698963165283203125, -1.53738319873809814453125, -0.4986107647418975830078125), vec3(-0.96924364566802978515625, 1.875967502593994140625, 0.0415550582110881805419921875), vec3(0.055630080401897430419921875, -0.2039769589900970458984375, 1.05697154998779296875));
    return hsluv_fromLinear(param);
}

vec3 lchToRgb(vec3 tuple)
{
    vec3 param = tuple;
    vec3 param_1 = lchToLuv(param);
    vec3 param_2 = luvToXyz(param_1);
    return xyzToRgb(param_2);
}

vec3 hsluvToRgb(vec3 tuple)
{
    vec3 param = tuple;
    vec3 _411 = hsluvToLch(param);
    vec3 param_1 = _411;
    return lchToRgb(param_1);
}

vec3 getRGB(float x)
{
    if (_455.colorSpaceHSL != 0)
    {
        vec3 param = vec3(((x * float(_455.hueTo - _455.hueFrom)) / 360.0) + (float(_455.hueFrom) / 360.0), float(_455.saturation) / 100.0, float(_455.lightness) / 100.0);
        return hsv2rgb(param);
    }
    else
    {
        if (_455.colorSpaceHSLuv != 0)
        {
            vec3 param_1 = vec3((x * float(_455.hueTo - _455.hueFrom)) + float(_455.hueFrom), float(_455.saturation), float(_455.lightness));
            return hsluvToRgb(param_1);
        }
    }
}

void mainImage(out vec4 fragColor, inout vec2 fragCoord)
{
    fragCoord /= _455.iResolution.xy;
    vec4 sample1 = texture2D(iChannel1, vec2(fragCoord.x, 0.0));
    float h = fragCoord.y;
    float param = fragCoord.x;
    vec3 rgb = getRGB(param);
    fragColor = vec4(0.001000000047497451305389404296875);
    for (int i = 0; i < 5; i++)
    {
        float r = _556[i];
        float a = _561[i];
        float max_ = 0.5 + (sample1.x * r);
        float min_ = 0.5 - (sample1.y * r);
        if ((min_ <= h) && (h <= max_))
        {
            fragColor = vec4(rgb * a, a);
        }
    }
}

void main()
{
    vec2 param_1 = floor(getCoord() * _455.iResolution.xy);
    vec4 param;
    mainImage(param, param_1);
    gl_FragData[0] = param;
}


Failed to build graphics pipeline state
@tam1m tam1m added the bug Something isn't working label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants