Removed javascript rand function, replaced with a much faster and gpu related random texture lookup. Other small improvements

This commit is contained in:
Filippo Scognamiglio
2014-03-31 14:13:51 +02:00
parent 5cb3c0c6ba
commit 9ff1bcb074
8 changed files with 165 additions and 99 deletions
+27 -6
View File
@@ -71,6 +71,27 @@ ApplicationWindow{
id: maincontainer
anchors.fill: parent
clip: true
Image{
id: randtexture
source: "frames/images/randfunction.png"
width: 512
height: 512
}
ShaderEffectSource{
id: randfuncsource
sourceItem: randtexture
live: false
hideSource: true
wrapMode: ShaderEffectSource.Repeat
}
Timer{
id: timetimer
property real time: 0
onTriggered: time += interval
interval: 16
running: true
repeat: true
}
Terminal{
id: terminal
width: parent.width
@@ -81,12 +102,6 @@ ApplicationWindow{
sourceItem: terminal
sourceRect: frame.sourceRect
}
ShaderManager{
id: shadercontainer
anchors.fill: terminal
blending: true
z: 1.9
}
Loader{
id: frame
property rect sourceRect: item.sourceRect
@@ -95,6 +110,12 @@ ApplicationWindow{
z: 2.1
source: shadersettings.frame_source
}
ShaderManager{
id: shadercontainer
anchors.fill: parent
blending: true
z: 1.9
}
RadialGradient{
id: ambientreflection
z: 2.0