1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2025-01-18 12:15:27 +00:00

Improved casualness of horizontal distortion.

This commit is contained in:
Filippo Scognamiglio 2014-04-18 12:00:17 +02:00
parent 53d9ba13d9
commit 01b5dd9651
3 changed files with 5 additions and 2 deletions

View File

@ -91,7 +91,7 @@ ShaderEffect {
originalCoord = qt_MultiTexCoord0;
qt_TexCoord0.x = -"+disp_left.toFixed(1)+"/txt_Size.x + qt_MultiTexCoord0.x / ((txt_Size.x -("+(disp_left+disp_right).toFixed(1)+")) / txt_Size.x);" +
"qt_TexCoord0.y = -"+disp_top.toFixed(1)+"/txt_Size.y + qt_MultiTexCoord0.y / ((txt_Size.y -("+(disp_top+disp_bottom).toFixed(1)+")) / txt_Size.y);" +
"vec2 coords = vec2(fract(time/(1024.0*2.0)), fract(time/(1024.0*1024.0*2.0)));" +
"vec2 coords = vec2(fract(time/(1024.0*2.0)), fract(time/(1024.0*1024.0)));" +
(brightness_flickering !== 0.0 ? "
brightness = texture2D(randomFunctionSource, coords).g * "+brightness_flickering.toFixed(1)+";"
: "") +

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.0.1, 2014-04-18T10:51:47. -->
<!-- Written by QtCreator 3.0.1, 2014-04-18T11:56:15. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>

View File

@ -109,6 +109,9 @@ ApplicationWindow{
source: "frames/images/randfunction.png"
width: 512
height: 512
sourceSize.width: 512
sourceSize.height: 256
fillMode: Image.TileVertically
}
ShaderEffectSource{
id: randfuncsource