summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-08-08 12:46:40 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-08-10 12:59:34 +0000
commitc2eb3d25207631dcb12917b4f06c85a9a49ccf95 (patch)
treef2f371138f022b961a204ce03ea1f9a8b21b1314 /tests
parent327a9290e120894a58e266ce35cc70d61d6e6507 (diff)
Fix effect order
Object order in the scene graph is front to back (like with Layer). When building the effect chain for rendering (which is back to front by nature) the effect list must be iterated in reverse order. (just like the compositor does for layers) Task-number: QT3DS-2053 Change-Id: I0ef82fe678330f9863a08f0411638f216dbef5f4 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/q3dslancelot/data/effects/verify_front_to_back_object_ordering.uip51
-rw-r--r--tests/scenes/effects/addcol_emboss_order.uip51
2 files changed, 102 insertions, 0 deletions
diff --git a/tests/auto/q3dslancelot/data/effects/verify_front_to_back_object_ordering.uip b/tests/auto/q3dslancelot/data/effects/verify_front_to_back_object_ordering.uip
new file mode 100644
index 0000000..f2976b8
--- /dev/null
+++ b/tests/auto/q3dslancelot/data/effects/verify_front_to_back_object_ordering.uip
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<UIP version="4" >
+ <Project >
+ <ProjectSettings author="" company="" presentationWidth="1280" presentationHeight="720" maintainAspect="False" >
+ <CustomColors count="16" >#ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors>
+ </ProjectSettings>
+ <Classes >
+ <Effect id="AdditiveColorGradient" name="AdditiveColorGradient" sourcepath="effects/AdditiveColorGradient.effect" />
+ <Effect id="Emboss" name="Emboss" sourcepath="effects/Emboss.effect" />
+ </Classes>
+ <Graph >
+ <Scene id="Scene" >
+ <Layer id="Layer" >
+ <Camera id="Camera" />
+ <Light id="Light" />
+ <Model id="Cube" >
+ <Material id="Default" name="Default" />
+ </Model>
+ <Model id="Sphere" >
+ <Material id="Default_001" name="Default" />
+ </Model>
+ <Effect id="AdditiveColorGradient_001" class="#AdditiveColorGradient" />
+ <Effect id="Emboss_001" class="#Emboss" />
+ </Layer>
+ </Scene>
+ </Graph>
+ <Logic >
+ <State name="Master Slide" component="#Scene" >
+ <Add ref="#Layer" />
+ <Add ref="#Camera" />
+ <Add ref="#Light" />
+ <State id="Scene-Slide1" name="Slide1" playmode="Looping" >
+ <Add ref="#Cube" name="Cube" position="-343.203 96.5458 0" rotation="-22.9052 -70.9856 10.3556" sourcepath="#Cube" >
+ <AnimationTrack property="rotation.x" type="EaseInOut" >0 -22.9052 100 100 10 -22.905 100 100</AnimationTrack>
+ <AnimationTrack property="rotation.y" type="EaseInOut" >0 -70.9856 100 100 10 200 100 100</AnimationTrack>
+ <AnimationTrack property="rotation.z" type="EaseInOut" >0 10.3556 100 100 10 10.356 100 100</AnimationTrack>
+ </Add>
+ <Add ref="#Default" />
+ <Add ref="#Sphere" name="Sphere" position="182.186 -32.7165 0" rotation="71.3254 -100.135 -168.32" scale="2.45138 1 1.78719" sourcepath="#Sphere" >
+ <AnimationTrack property="rotation.x" type="EaseInOut" >0 71.3254 100 100 10 71.325 100 100</AnimationTrack>
+ <AnimationTrack property="rotation.y" type="EaseInOut" >0 -100.135 100 100 10 300 100 100</AnimationTrack>
+ <AnimationTrack property="rotation.z" type="EaseInOut" >0 -168.32 100 100 10 -168.32 100 100</AnimationTrack>
+ </Add>
+ <Add ref="#Default_001" />
+ <Add ref="#AdditiveColorGradient_001" name="AdditiveColorGradient" />
+ <Add ref="#Emboss_001" name="Emboss" />
+ </State>
+ </State>
+ </Logic>
+ </Project>
+</UIP>
diff --git a/tests/scenes/effects/addcol_emboss_order.uip b/tests/scenes/effects/addcol_emboss_order.uip
new file mode 100644
index 0000000..f05eaf9
--- /dev/null
+++ b/tests/scenes/effects/addcol_emboss_order.uip
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<UIP version="4" >
+ <Project >
+ <ProjectSettings author="" company="" presentationWidth="1280" presentationHeight="720" maintainAspect="False" >
+ <CustomColors count="16" >#ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors>
+ </ProjectSettings>
+ <Classes >
+ <Effect id="AdditiveColorGradient" name="AdditiveColorGradient" sourcepath="AdditiveColorGradient.effect" />
+ <Effect id="Emboss" name="Emboss" sourcepath="Emboss.effect" />
+ </Classes>
+ <Graph >
+ <Scene id="Scene" >
+ <Layer id="Layer" >
+ <Camera id="Camera" />
+ <Light id="Light" />
+ <Model id="Cube" >
+ <Material id="Default" name="Default" />
+ </Model>
+ <Model id="Sphere" >
+ <Material id="Default_001" name="Default" />
+ </Model>
+ <Effect id="AdditiveColorGradient_001" class="#AdditiveColorGradient" />
+ <Effect id="Emboss_001" class="#Emboss" />
+ </Layer>
+ </Scene>
+ </Graph>
+ <Logic >
+ <State name="Master Slide" component="#Scene" >
+ <Add ref="#Layer" />
+ <Add ref="#Camera" />
+ <Add ref="#Light" />
+ <State id="Scene-Slide1" name="Slide1" playmode="Looping" >
+ <Add ref="#Cube" name="Cube" position="-343.203 96.5458 0" rotation="-22.9052 -70.9856 10.3556" sourcepath="#Cube" >
+ <AnimationTrack property="rotation.x" type="EaseInOut" >0 -22.9052 100 100 10 -22.905 100 100</AnimationTrack>
+ <AnimationTrack property="rotation.y" type="EaseInOut" >0 -70.9856 100 100 10 200 100 100</AnimationTrack>
+ <AnimationTrack property="rotation.z" type="EaseInOut" >0 10.3556 100 100 10 10.356 100 100</AnimationTrack>
+ </Add>
+ <Add ref="#Default" />
+ <Add ref="#Sphere" name="Sphere" position="182.186 -32.7165 0" rotation="71.3254 -100.135 -168.32" scale="2.45138 1 1.78719" sourcepath="#Sphere" >
+ <AnimationTrack property="rotation.x" type="EaseInOut" >0 71.3254 100 100 10 71.325 100 100</AnimationTrack>
+ <AnimationTrack property="rotation.y" type="EaseInOut" >0 -100.135 100 100 10 300 100 100</AnimationTrack>
+ <AnimationTrack property="rotation.z" type="EaseInOut" >0 -168.32 100 100 10 -168.32 100 100</AnimationTrack>
+ </Add>
+ <Add ref="#Default_001" />
+ <Add ref="#AdditiveColorGradient_001" name="AdditiveColorGradient" />
+ <Add ref="#Emboss_001" name="Emboss" />
+ </State>
+ </State>
+ </Logic>
+ </Project>
+</UIP>