diff options
Diffstat (limited to 'src/declarative/particles/defaultshaders/simplevertex.shader')
-rw-r--r-- | src/declarative/particles/defaultshaders/simplevertex.shader | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/declarative/particles/defaultshaders/simplevertex.shader b/src/declarative/particles/defaultshaders/simplevertex.shader index b7542e660e..1c07363505 100644 --- a/src/declarative/particles/defaultshaders/simplevertex.shader +++ b/src/declarative/particles/defaultshaders/simplevertex.shader @@ -1,16 +1,13 @@ attribute highp vec2 vPos; -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 qt_Matrix; uniform highp float timestamp; -varying highp vec2 fTex; varying lowp float fFade; void main() { - fTex = vTex; highp float size = vData.z; highp float endSize = vData.w; @@ -21,8 +18,9 @@ void main() { if (t < 0. || t > 1.) currentSize = 0.; + gl_PointSize = currentSize; + highp vec2 pos = vPos - - currentSize / 2. + currentSize * vTex // adjust size + vVec.xy * t * vData.y // apply speed vector.. + 0.5 * vVec.zw * pow(t * vData.y, 2.); |