diff options
Diffstat (limited to 'src/qcam/assets')
-rw-r--r-- | src/qcam/assets/shader/RGB.frag | 22 | ||||
-rw-r--r-- | src/qcam/assets/shader/shaders.qrc | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/qcam/assets/shader/RGB.frag b/src/qcam/assets/shader/RGB.frag new file mode 100644 index 00000000..4c374ac9 --- /dev/null +++ b/src/qcam/assets/shader/RGB.frag @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2020, Laurent Pinchart + * + * RGB.frag - Fragment shader code for RGB formats + */ + +#ifdef GL_ES +precision mediump float; +#endif + +varying vec2 textureOut; +uniform sampler2D tex_y; + +void main(void) +{ + vec3 rgb; + + rgb = texture2D(tex_y, textureOut).RGB_PATTERN; + + gl_FragColor = vec4(rgb, 1.0); +} diff --git a/src/qcam/assets/shader/shaders.qrc b/src/qcam/assets/shader/shaders.qrc index 86310914..8a8f9de1 100644 --- a/src/qcam/assets/shader/shaders.qrc +++ b/src/qcam/assets/shader/shaders.qrc @@ -1,6 +1,7 @@ <!-- SPDX-License-Identifier: LGPL-2.1-or-later --> <!DOCTYPE RCC><RCC version="1.0"> <qresource> + <file>RGB.frag</file> <file>YUV_2_planes.frag</file> <file>YUV_3_planes.frag</file> <file>YUV_packed.frag</file> |