| 1 |
import QtQuick 2.0 |
| 2 |
|
| 3 |
Item { |
| 4 |
width: 320 |
| 5 |
height: 480 |
| 6 |
|
| 7 |
Text { |
| 8 |
id: text |
| 9 |
anchors.horizontalCenter: parent.horizontalCenter |
| 10 |
anchors.top: parent.top |
| 11 |
font.pixelSize: 80 |
| 12 |
text: "Shaderz!" |
| 13 |
} |
| 14 |
|
| 15 |
ShaderEffectSource { |
| 16 |
id: source |
| 17 |
sourceItem: text |
| 18 |
hideSource: false |
| 19 |
} |
| 20 |
|
| 21 |
ShaderEffect { |
| 22 |
id: effect |
| 23 |
anchors.top: text.bottom |
| 24 |
anchors.left: text.left |
| 25 |
width: text.width |
| 26 |
height: text.height |
| 27 |
|
| 28 |
property variant source: source |
| 29 |
|
| 30 |
fragmentShader: "qrc:shaders/gradient.frag" |
| 31 |
} |
| 32 |
} |