| 1 |
import QtQuick 2.0 |
| 2 |
|
| 3 |
Item { |
| 4 |
width: 320 |
| 5 |
height: 480 |
| 6 |
|
| 7 |
ShaderEffectSource { |
| 8 |
id: source |
| 9 |
sourceItem: text |
| 10 |
textureSize: Qt.size(text.width / 2, text.height / 2) |
| 11 |
smooth: true |
| 12 |
} |
| 13 |
|
| 14 |
ShaderEffect { |
| 15 |
anchors.fill: text |
| 16 |
|
| 17 |
property variant source: source |
| 18 |
property variant textureSize: source.textureSize |
| 19 |
property color color: "black" |
| 20 |
|
| 21 |
fragmentShader: "qrc:shaders/edge.frag" |
| 22 |
} |
| 23 |
|
| 24 |
Text { |
| 25 |
id: text |
| 26 |
anchors.centerIn: parent |
| 27 |
font.pixelSize: 80 |
| 28 |
text: "Shaderz!" |
| 29 |
color: "white" |
| 30 |
} |
| 31 |
} |