diff options
Diffstat (limited to 'src/declarative/particles/defaultshaders/coloredvertex.shader')
-rw-r--r-- | src/declarative/particles/defaultshaders/coloredvertex.shader | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/declarative/particles/defaultshaders/coloredvertex.shader b/src/declarative/particles/defaultshaders/coloredvertex.shader index d6498f277f..cdbb130dd9 100644 --- a/src/declarative/particles/defaultshaders/coloredvertex.shader +++ b/src/declarative/particles/defaultshaders/coloredvertex.shader @@ -1,5 +1,4 @@ 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 attribute lowp vec4 vColor; @@ -7,11 +6,9 @@ attribute lowp vec4 vColor; uniform highp mat4 qt_Matrix; uniform highp float timestamp; -varying highp vec2 fTex; varying lowp vec4 fColor; void main() { - fTex = vTex; highp float size = vData.z; highp float endSize = vData.w; @@ -22,8 +19,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.); |