summaryrefslogtreecommitdiffstats
path: root/src/compositor/shaders/surface_oes_external.frag
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor/shaders/surface_oes_external.frag')
-rw-r--r--src/compositor/shaders/surface_oes_external.frag22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/compositor/shaders/surface_oes_external.frag b/src/compositor/shaders/surface_oes_external.frag
index 724d06a85..3064bf7b1 100644
--- a/src/compositor/shaders/surface_oes_external.frag
+++ b/src/compositor/shaders/surface_oes_external.frag
@@ -1,8 +1,18 @@
-#extension GL_OES_EGL_image_external : require
-varying highp vec2 v_texcoord;
-uniform highp samplerExternalOES tex0;
-uniform lowp float qt_Opacity;
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
-void main() {
- gl_FragColor = qt_Opacity * texture2D(tex0, v_texcoord);
+// This shader stump cannot be precompiled and is compiled at run-time.
+// Appropriate target preamble added when it is loaded.
+
+varying vec2 v_texcoord;
+struct buf {
+ mat4 qt_Matrix;
+ float qt_Opacity;
+};
+uniform buf ubuf;
+uniform samplerExternalOES tex0;
+
+void main()
+{
+ gl_FragColor = ubuf.qt_Opacity * texture2D(tex0, v_texcoord);
}