diff options
Diffstat (limited to 'src/compositor/shaders/surface_oes_external.frag')
-rw-r--r-- | src/compositor/shaders/surface_oes_external.frag | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/compositor/shaders/surface_oes_external.frag b/src/compositor/shaders/surface_oes_external.frag index 37ae36680..3064bf7b1 100644 --- a/src/compositor/shaders/surface_oes_external.frag +++ b/src/compositor/shaders/surface_oes_external.frag @@ -1,17 +1,18 @@ -#version 440 -#extension GL_OES_EGL_image_external_essl3 : require +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only -layout(location = 0) in vec2 v_texcoord; -layout(location = 0) out vec4 fragColor; +// This shader stump cannot be precompiled and is compiled at run-time. +// Appropriate target preamble added when it is loaded. -layout(std140, binding = 0) uniform buf { +varying vec2 v_texcoord; +struct buf { mat4 qt_Matrix; float qt_Opacity; }; - -layout(binding = 1) uniform samplerExternalOES tex0; +uniform buf ubuf; +uniform samplerExternalOES tex0; void main() { - fragColor = qt_Opacity * texture(tex0, v_texcoord); + gl_FragColor = ubuf.qt_Opacity * texture2D(tex0, v_texcoord); } |