From 0eec42dff07073d9e0cb955b0888f63e073f2a2a Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Thu, 15 Sep 2011 17:29:06 +1000 Subject: [PATCH] Don't draw itty-bitty particles They look terrible when rounding errors catch up. Jerky movement and flickering between N and N+1 square pixels when rendered. Change-Id: Id27caa38de70a10537382962cc29a0f1254a91fc Reviewed-on: http://codereview.qt-project.org/4949 Reviewed-by: Qt Sanity Bot Reviewed-by: Alan Alpert --- .../particles/defaultshaders/imagevertex.shader | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/declarative/particles/defaultshaders/imagevertex.shader b/src/declarative/particles/defaultshaders/imagevertex.shader index 9967ef8..daf49fd 100644 --- a/src/declarative/particles/defaultshaders/imagevertex.shader +++ b/src/declarative/particles/defaultshaders/imagevertex.shader @@ -81,6 +81,11 @@ void main() { else if(entry == 2.) currentSize = currentSize * fadeIn * fadeOut; + if(currentSize <= 0)//Sizes too small look jittery as they move + currentSize = 0; + else if(currentSize < 3) + currentSize = 3; + highp vec2 pos; #ifdef DEFORM highp float rotation = vRotation.x + vRotation.y * t * vData.y; -- 1.7.2.5