From de36406ed588e8b40a71dd83781eb25d38d6debc Mon Sep 17 00:00:00 2001 From: Filippo Scognamiglio Date: Sun, 6 Apr 2014 17:59:19 +0200 Subject: [PATCH] Now reflections play well with horizontal flickering. --- app/ShaderManager.qml | 6 +++--- app/app.qmlproject.user | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/ShaderManager.qml b/app/ShaderManager.qml index d607c00..0ec3f51 100644 --- a/app/ShaderManager.qml +++ b/app/ShaderManager.qml @@ -173,6 +173,9 @@ ShaderEffect { :" vec2 coords = qt_TexCoord0;") + + (frame_reflection_strength ? " + coords = abs(mod(floor(coords), 2.0) - fract(coords));" : "") + + (horizontal_sincronization !== 0 ? " float h_distortion = 0.5 * sin(time*0.001 + coords.y*10.0*fract(time/10.0)); h_distortion += 0.5 * cos(time*0.04 + 0.03 + coords.y*50.0*fract(time/10.0 + 0.4)); @@ -181,9 +184,6 @@ ShaderEffect { noise += horizontal_distortion * 0.5;" : "") : "") + - (frame_reflection_strength ? " - coords = abs(mod(floor(coords), 2.0) - fract(coords));" : "") + - "float color = texture2D(source, coords).r;" + (noise_strength !== 0 ? " diff --git a/app/app.qmlproject.user b/app/app.qmlproject.user index 4e80251..979bf04 100644 --- a/app/app.qmlproject.user +++ b/app/app.qmlproject.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget