diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-08-18 20:47:23 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-08-23 07:31:41 +0200 |
commit | 4ce1af458c67d824fd2412c1a2f847af39b04902 (patch) | |
tree | f786222aa56ae69beb50544da991c8b6e4c10bf1 /src/declarative/particles/defaultshaders/simplevertex.shader | |
parent | e30f56ee23b62eb5cd33505b544e7d1fa2766211 (diff) |
Add the rest of the tiered shaders to QSGImageParticle
Also simplifies the use of multiple shaders.
Change-Id: Ib4e16406865407626e4e736e7daeba4855dc0574
Reviewed-on: http://codereview.qt.nokia.com/3174
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/declarative/particles/defaultshaders/simplevertex.shader')
-rw-r--r-- | src/declarative/particles/defaultshaders/simplevertex.shader | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/declarative/particles/defaultshaders/simplevertex.shader b/src/declarative/particles/defaultshaders/simplevertex.shader index f185ef0700..b7542e660e 100644 --- a/src/declarative/particles/defaultshaders/simplevertex.shader +++ b/src/declarative/particles/defaultshaders/simplevertex.shader @@ -3,9 +3,8 @@ attribute highp vec2 vTex; attribute highp vec4 vData; // x = time, y = lifeSpan, z = size, w = endSize attribute highp vec4 vVec; // x,y = constant speed, z,w = acceleration -uniform highp mat4 matrix; +uniform highp mat4 qt_Matrix; uniform highp float timestamp; -uniform lowp float opacity; varying highp vec2 fTex; varying lowp float fFade; @@ -27,10 +26,10 @@ void main() { + vVec.xy * t * vData.y // apply speed vector.. + 0.5 * vVec.zw * pow(t * vData.y, 2.); - gl_Position = matrix * vec4(pos.x, pos.y, 0, 1); + gl_Position = qt_Matrix * vec4(pos.x, pos.y, 0, 1); highp float fadeIn = min(t * 10., 1.); highp float fadeOut = 1. - max(0., min((t - 0.75) * 4., 1.)); - fFade = fadeIn * fadeOut * opacity; + fFade = fadeIn * fadeOut; } |