Browse Source

Tweak a wealth of ShaderEffect related values

Change-Id: I6f5b96f904a112af2e8aaf6763de4bd89ea454d5
Donald Carr 8 years ago
parent
commit
810b6167bc
4 changed files with 10 additions and 2 deletions
  1. 4 1
      qml/common/ArtImage.qml
  2. 3 0
      qml/common/VisualEffect.qml
  3. 1 1
      qml/effects/Billboard.qml
  4. 2 0
      qml/effects/Effect.qml

+ 4 - 1
qml/common/ArtImage.qml

@@ -29,7 +29,10 @@ Rectangle {
         sourceSize.width: width
         sourceSize.width: width
 
 
         Behavior on opacity {
         Behavior on opacity {
-            NumberAnimation { duration: 1000 }
+            SequentialAnimation {
+                ScriptAction { script: root.effect !== undefined ? root.effect.scheduleUpdate() : undefined }
+                NumberAnimation { duration: 1000 }
+            }
         }
         }
 
 
         onStatusChanged: {
         onStatusChanged: {

+ 3 - 0
qml/common/VisualEffect.qml

@@ -8,6 +8,8 @@ Item {
     property string effect: "Random"
     property string effect: "Random"
     property var effectObject
     property var effectObject
 
 
+    function scheduleUpdate() { effectSource.scheduleUpdate() }
+
     anchors.fill: target
     anchors.fill: target
 
 
     ShaderEffectSource {
     ShaderEffectSource {
@@ -15,6 +17,7 @@ Item {
         smooth: true
         smooth: true
         hideSource: true
         hideSource: true
         sourceItem: target
         sourceItem: target
+        live: false
     }
     }
 
 
     Component.onCompleted: {
     Component.onCompleted: {

+ 1 - 1
qml/effects/Billboard.qml

@@ -51,7 +51,7 @@
 import QtQuick 2.5
 import QtQuick 2.5
 
 
 Effect {
 Effect {
-    property real grid: 30.0
+    property real grid: 15.0
 
 
     property real step_x: 0.0015625
     property real step_x: 0.0015625
     property real step_y: targetHeight ? (step_x * targetWidth / targetHeight) : 0.0
     property real step_y: targetHeight ? (step_x * targetWidth / targetHeight) : 0.0

+ 2 - 0
qml/effects/Effect.qml

@@ -57,6 +57,8 @@ ShaderEffect {
     property string fragmentShaderFilename
     property string fragmentShaderFilename
     property string vertexShaderFilename
     property string vertexShaderFilename
 
 
+    blending: false
+
     QtObject {
     QtObject {
         id: d
         id: d
         property string fragmentShaderCommon: "
         property string fragmentShaderCommon: "