aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/shaders
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@theqtcompany.com>2016-06-30 16:58:55 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2016-07-14 13:04:57 +0000
commit9d4f11a500b2d478edd7d92391bbf3031103bced (patch)
treeef6b336bc4f74fd8eeae8cdc0d95be328fd31d3d /src/quick/items/shaders
parentf091351e5d4c116ffdd16768fec60bb07efa049f (diff)
Add QSGSpriteNode to the Scenegraph Adaptation Layer
Most core Qt Quick items use one of the nodes provided by the Scenegraph Adaptation Layer, however the two items that provide support for Sprites created their own custom nodes. There was significant redundancy in this, and it made it only possible to use the OpenGL adaptation. The AnimatedSprite and SpriteSequence items have been cleaned up, and now use the new QSGSpriteNode. Change-Id: Idc20b9c5da9dc1c94f6368021785382cdf7cec5a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/quick/items/shaders')
-rw-r--r--src/quick/items/shaders/sprite.frag12
-rw-r--r--src/quick/items/shaders/sprite.vert23
-rw-r--r--src/quick/items/shaders/sprite_core.frag16
-rw-r--r--src/quick/items/shaders/sprite_core.vert24
4 files changed, 0 insertions, 75 deletions
diff --git a/src/quick/items/shaders/sprite.frag b/src/quick/items/shaders/sprite.frag
deleted file mode 100644
index e1fcb0f006..0000000000
--- a/src/quick/items/shaders/sprite.frag
+++ /dev/null
@@ -1,12 +0,0 @@
-uniform sampler2D _qt_texture;
-uniform lowp float qt_Opacity;
-
-varying highp vec4 fTexS;
-varying lowp float progress;
-
-void main()
-{
- gl_FragColor = mix(texture2D(_qt_texture, fTexS.xy),
- texture2D(_qt_texture, fTexS.zw),
- progress) * qt_Opacity;
-} \ No newline at end of file
diff --git a/src/quick/items/shaders/sprite.vert b/src/quick/items/shaders/sprite.vert
deleted file mode 100644
index fc826f60b4..0000000000
--- a/src/quick/items/shaders/sprite.vert
+++ /dev/null
@@ -1,23 +0,0 @@
-attribute highp vec2 vPos;
-attribute highp vec2 vTex;
-
-uniform highp vec3 animData;// w,h(premultiplied of anim), interpolation progress
-uniform highp vec4 animPos;//x,y, x,y (two frames for interpolation)
-
-uniform highp mat4 qt_Matrix;
-
-varying highp vec4 fTexS;
-varying lowp float progress;
-
-void main()
-{
- progress = animData.z;
-
- // Calculate frame location in texture
- fTexS.xy = animPos.xy + vTex.xy * animData.xy;
-
- // Next frame is also passed, for interpolation
- fTexS.zw = animPos.zw + vTex.xy * animData.xy;
-
- gl_Position = qt_Matrix * vec4(vPos.x, vPos.y, 0, 1);
-} \ No newline at end of file
diff --git a/src/quick/items/shaders/sprite_core.frag b/src/quick/items/shaders/sprite_core.frag
deleted file mode 100644
index c1087a8754..0000000000
--- a/src/quick/items/shaders/sprite_core.frag
+++ /dev/null
@@ -1,16 +0,0 @@
-#version 150 core
-
-in vec4 fTexS;
-in float progress;
-
-out vec4 fragColor;
-
-uniform sampler2D _qt_texture;
-uniform float qt_Opacity;
-
-void main()
-{
- fragColor = mix(texture(_qt_texture, fTexS.xy),
- texture(_qt_texture, fTexS.zw),
- progress) * qt_Opacity;
-} \ No newline at end of file
diff --git a/src/quick/items/shaders/sprite_core.vert b/src/quick/items/shaders/sprite_core.vert
deleted file mode 100644
index 5027bf03fc..0000000000
--- a/src/quick/items/shaders/sprite_core.vert
+++ /dev/null
@@ -1,24 +0,0 @@
-#version 150 core
-
-in vec2 vPos;
-in vec2 vTex;
-
-out vec4 fTexS;
-out float progress;
-
-uniform vec3 animData; // w,h(premultiplied of anim), interpolation progress
-uniform vec4 animPos; // x,y, x,y (two frames for interpolation)
-uniform mat4 qt_Matrix;
-
-void main()
-{
- progress = animData.z;
-
- // Calculate frame location in texture
- fTexS.xy = animPos.xy + vTex.xy * animData.xy;
-
- // Next frame is also passed, for interpolation
- fTexS.zw = animPos.zw + vTex.xy * animData.xy;
-
- gl_Position = qt_Matrix * vec4(vPos.x, vPos.y, 0, 1);
-} \ No newline at end of file