From: Alan Alpert Date: Thu, 25 Aug 2011 07:19:17 +0000 (+1000) Subject: Fix entryEffect for Sprite performance level X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=f0eec8c2a4cac2e76ec90bde37f8ebc701896ce6;p=konrad%2Fqtdeclarative.git Fix entryEffect for Sprite performance level Change-Id: Icca2e6662a640242b4e676cd07b084a38dab5fb7 Reviewed-on: http://codereview.qt.nokia.com/3570 Reviewed-by: Qt Sanity Bot Reviewed-by: Martin Jones --- diff --git a/src/declarative/particles/defaultshaders/imagevertex.shader b/src/declarative/particles/defaultshaders/imagevertex.shader index e1033c9..9967ef8 100644 --- a/src/declarative/particles/defaultshaders/imagevertex.shader +++ b/src/declarative/particles/defaultshaders/imagevertex.shader @@ -75,8 +75,9 @@ void main() { currentSize = currentSize * sizetable[int(floor(t*64.))]; fade = fade * opacitytable[int(floor(t*64.))]; #endif + if (entry == 1.) - fade = fadeIn * fadeOut; + fade = fade * fadeIn * fadeOut; else if(entry == 2.) currentSize = currentSize * fadeIn * fadeOut; diff --git a/src/declarative/particles/qsgimageparticle.cpp b/src/declarative/particles/qsgimageparticle.cpp index 57461a4..a12d1c2 100644 --- a/src/declarative/particles/qsgimageparticle.cpp +++ b/src/declarative/particles/qsgimageparticle.cpp @@ -258,7 +258,7 @@ public: m_animcount_id = program()->uniformLocation("animcount"); m_entry_id = program()->uniformLocation("entry"); m_sizetable_id = program()->uniformLocation("sizetable"); - m_opacitytable_id = program()->uniformLocation("sizetable"); + m_opacitytable_id = program()->uniformLocation("opacitytable"); } void updateState(const SpriteMaterialData* d, const SpriteMaterialData*) { @@ -432,7 +432,7 @@ void fillUniformArrayFromImage(float* array, const QImage& img, int size) { if (img.isNull()){ for (int i=0; i