diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-08-19 14:56:19 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-08-24 04:23:40 +0200 |
commit | cd3ae498bfac3cf98f6386f17596d1ec5ed08110 (patch) | |
tree | 484ce4ff95b18d6a06771fa8704574e644169255 /src/declarative/particles/defaultshaders/simplevertex.shader | |
parent | b18974cb3d448696c985c7d3a965dcf9523a4e9e (diff) |
Use point sprites
Only for the simpler particles, at least for now.
Change-Id: If777cf301894553849b78060aa23980aee7fb807
Reviewed-on: http://codereview.qt.nokia.com/3240
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
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.); |