diff options
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; } |