Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I am trying to blur the part of video(Ex:Test.mp4) using QML ShaderEffect. I am getting the errors QOpenGLShader::compile(Fragment): WARNING: 1:2:GLSL version 1.20
Forum Updated to NodeBB v4.3 + New Features

I am trying to blur the part of video(Ex:Test.mp4) using QML ShaderEffect. I am getting the errors QOpenGLShader::compile(Fragment): WARNING: 1:2:GLSL version 1.20

Scheduled Pinned Locked Moved General and Desktop
qml shadereffec
1 Posts 1 Posters 360 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bhav
    wrote on last edited by
    #1

    fragmentShader: "
    uniform float dividerValue = 0.7;
    uniform float blurSize = 15;

    uniform sampler2D source;
    uniform lowp float qt_Opacity;
    varying vec2 qt_TexCoord0;

    void main()
    {
    vec2 uv = qt_TexCoord0.xy;
    vec4 c = vec4(0.0);
    if (uv.x < dividerValue) {
    c += texture2D(source, uv - vec2(0.0, 4.0blurSize)) * 0.05;
    c += texture2D(source, uv - vec2(0.0, 3.0
    blurSize)) * 0.09;
    c += texture2D(source, uv - vec2(0.0, 2.0blurSize)) * 0.12;
    c += texture2D(source, uv - vec2(0.0, 1.0
    blurSize)) * 0.15;
    c += texture2D(source, uv) * 0.18;
    c += texture2D(source, uv + vec2(0.0, 1.0blurSize)) * 0.15;
    c += texture2D(source, uv + vec2(0.0, 2.0
    blurSize)) * 0.12;
    c += texture2D(source, uv + vec2(0.0, 3.0blurSize)) * 0.09;
    c += texture2D(source, uv + vec2(0.0, 4.0
    blurSize)) * 0.05;

    } else {
        c = texture2D(source, qt_TexCoord0);
    
    }
    // First pass we don't apply opacity
    gl_FragColor = c;
    

    }

    "
    }

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved