summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2016-07-10 15:27:01 +0100
committerSean Harmer <sean.harmer@kdab.com>2016-07-12 19:15:46 +0000
commit68e0e8837a7437b483d8639167a6ebad57b1dd35 (patch)
treed89fd9faee629f1db2ac2069eeec8372f6e50394 /tests
parent2390fbeac2cb38d68b08a8fda1141cf713b32e4b (diff)
Save per-fragment normalization by doing it CPU side once when set
The spot light local direction was being normalized in the fragment shader which is a lot of work. Much better to normalize it once on the CPU side when it is updated. Change-Id: I87045462b6b09fad4262f5755493b87595d29f11 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/render/qabstractlight/tst_qabstractlight.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/render/qabstractlight/tst_qabstractlight.cpp b/tests/auto/render/qabstractlight/tst_qabstractlight.cpp
index 68fc2cd30..bc67148d2 100644
--- a/tests/auto/render/qabstractlight/tst_qabstractlight.cpp
+++ b/tests/auto/render/qabstractlight/tst_qabstractlight.cpp
@@ -276,7 +276,7 @@ private Q_SLOTS:
change = arbiter.events[2].staticCast<Qt3DCore::QPropertyUpdatedChange>();
QCOMPARE(change->propertyName(), "localDirection");
QCOMPARE(change->subjectId(), spotLight->id());
- QCOMPARE(change->value().value<QVector3D>(), QVector3D(0.5f, 0.0f, -1.0f));
+ QCOMPARE(change->value().value<QVector3D>(), QVector3D(0.5f, 0.0f, -1.0f).normalized());
QCOMPARE(change->type(), Qt3DCore::PropertyUpdated);
change = arbiter.events[3].staticCast<Qt3DCore::QPropertyUpdatedChange>();
QCOMPARE(change->propertyName(), "cutOffAngle");