From fe13f5bb05ef278eb5109a9518118dda7ddb0b9d Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Tue, 28 Apr 2015 18:35:38 +0200 Subject: Minor refactor of built-in QSGVideoNodes. - Load shader source from resource files. - Correctly report material types: each material can use different shaders depending on the video pixel format but it was reporting a unique material type. This was causing the node to keep using the same shader even if its pixel format changed. Change-Id: Ib903ecd6e7dd1dd56d7cefe255ab7049933df17d Reviewed-by: Gunnar Sletta --- src/qtmultimediaquicktools/shaders/biplanaryuvvideo.vert | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/qtmultimediaquicktools/shaders/biplanaryuvvideo.vert (limited to 'src/qtmultimediaquicktools/shaders/biplanaryuvvideo.vert') diff --git a/src/qtmultimediaquicktools/shaders/biplanaryuvvideo.vert b/src/qtmultimediaquicktools/shaders/biplanaryuvvideo.vert new file mode 100644 index 000000000..d01b69078 --- /dev/null +++ b/src/qtmultimediaquicktools/shaders/biplanaryuvvideo.vert @@ -0,0 +1,13 @@ +uniform highp mat4 qt_Matrix; +uniform highp float plane1Width; +uniform highp float plane2Width; +attribute highp vec4 qt_VertexPosition; +attribute highp vec2 qt_VertexTexCoord; +varying highp vec2 plane1TexCoord; +varying highp vec2 plane2TexCoord; + +void main() { + plane1TexCoord = qt_VertexTexCoord * vec2(plane1Width, 1); + plane2TexCoord = qt_VertexTexCoord * vec2(plane2Width, 1); + gl_Position = qt_Matrix * qt_VertexPosition; +} -- cgit v1.2.3