diff options
author | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2020-05-21 15:17:07 +0200 |
---|---|---|
committer | Val Doroshchuk <valentyn.doroshchuk@qt.io> | 2020-05-29 16:46:42 +0200 |
commit | f60c028d522ce3e4ed01cf00e6601956a1f0ed01 (patch) | |
tree | 82e33543e766cdf1dc95d4a1cfad596f479b7a47 /src/qtmultimediaquicktools/shaders_ng/rgba.frag | |
parent | 5238ce8fdc5dd357dc96e351ba8baea73ce9fb55 (diff) |
Quick: Add support of RHI for video frames
Added RHI shaders for RGB*, YUV* and opengl texture video frames.
Task-number: QTBUG-78678
Change-Id: I045d6a806fea059a80b8e5d9817b6997af8d0f41
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/qtmultimediaquicktools/shaders_ng/rgba.frag')
-rw-r--r-- | src/qtmultimediaquicktools/shaders_ng/rgba.frag | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/qtmultimediaquicktools/shaders_ng/rgba.frag b/src/qtmultimediaquicktools/shaders_ng/rgba.frag new file mode 100644 index 000000000..1623c2cc7 --- /dev/null +++ b/src/qtmultimediaquicktools/shaders_ng/rgba.frag @@ -0,0 +1,16 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord; +layout(location = 0) out vec4 fragColor; + +layout(std140, binding = 0) uniform buf { + mat4 matrix; + float opacity; +} ubuf; + +layout(binding = 1) uniform sampler2D rgbTexture; + +void main() +{ + fragColor = texture(rgbTexture, qt_TexCoord) * ubuf.opacity; +} |