Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-134057

wasm: camera example fails in webgl

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8
    • GUI: OpenGL, Multimedia
    • None
    • WebAssembly

    Description

      Camera example fails in two ways

      • it takes a reload to get camera listed in menu and turned on
      • webgl shader fails to compile:

      camera.js:13983 Failed to compile shader: ERROR: 0:25: '[]' : Index expression must be constant Source was: #version 100 precision highp float; precision highp int; struct buf { mat4 matrix; mat4 colorMatrix; float opacity; float width; float masteringWhite; float maxLum; int redOrAlphaIndex; }; uniform buf ubuf; uniform highp sampler2D plane1Texture; uniform highp sampler2D plane2Texture; varying vec2 texCoord; void main() { float Y = texture2D(plane1Texture, texCoord)[ubuf.redOrAlphaIndex]; vec2 UV = texture2D(plane2Texture, texCoord).xy; vec4 color = vec4(Y, UV.x, UV.y, 1.0); gl_FragData[0] = (ubuf.colorMatrix * color) * ubuf.opacity; gl_FragData[0] = clamp(gl_FragData[0], vec4(0.0), vec4(1.0)); }
       
      256
      14:36:45.624
      WebGL: INVALID_OPERATION: useProgram: program not valid

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.webassembly qt.webassembly
            lopotter-ext Lorn Potter
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes