diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2021-07-28 11:21:25 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2021-07-28 11:21:25 +0200 |
commit | 16436239cd35ba7346b89a1f57d5b29dc786f4c6 (patch) | |
tree | 7e9011d0dfdda5ef9ccc302dae69ab3e5ba4b8cc /src/quickcontrols2/imagine/impl/shaders/+glslcore/OpacityMask.frag | |
parent | 5a5b9c2344b961e984a2c860bb0c33022d641f32 (diff) | |
parent | 89d3486ad18d782a8141037a2bffb7992118cc78 (diff) |
Merge qtquickcontrols2 into qtdeclarative
Task-number: QTBUG-95173
Change-Id: I2cf31e30127e8cc2f10304cabf4ff7f5050633b8
Diffstat (limited to 'src/quickcontrols2/imagine/impl/shaders/+glslcore/OpacityMask.frag')
-rw-r--r-- | src/quickcontrols2/imagine/impl/shaders/+glslcore/OpacityMask.frag | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/quickcontrols2/imagine/impl/shaders/+glslcore/OpacityMask.frag b/src/quickcontrols2/imagine/impl/shaders/+glslcore/OpacityMask.frag new file mode 100644 index 0000000000..529e269614 --- /dev/null +++ b/src/quickcontrols2/imagine/impl/shaders/+glslcore/OpacityMask.frag @@ -0,0 +1,13 @@ +#version 150 + +uniform float qt_Opacity; +uniform sampler2D source; +uniform sampler2D maskSource; + +in vec2 qt_TexCoord0; +out vec4 fragColor; + +void main() +{ + fragColor = texture(source, qt_TexCoord0.st) * (texture(maskSource, qt_TexCoord0.st).a) * qt_Opacity; +} |