Now reflections play well with horizontal flickering.

This commit is contained in:
Filippo Scognamiglio 2014-04-06 17:59:19 +02:00
parent dc188a6e50
commit de36406ed5
2 changed files with 4 additions and 4 deletions

View File

@ -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 ? "

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.0.1, 2014-04-06T16:41:45. -->
<!-- Written by QtCreator 3.0.1, 2014-04-06T17:39:45. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>