From 122301b173688685ea71a17d40adc5a3db8f45f3 Mon Sep 17 00:00:00 2001 From: yvt Date: Wed, 4 Sep 2013 23:42:14 +0900 Subject: [PATCH] Adjusted refraction factor --- Resources/Shaders/Water.fs | 2 +- Resources/Shaders/Water2.fs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/Shaders/Water.fs b/Resources/Shaders/Water.fs index be60bb72..6f0f2122 100644 --- a/Resources/Shaders/Water.fs +++ b/Resources/Shaders/Water.fs @@ -86,7 +86,7 @@ void main() { float scale = 1. / dot(xToUV.xy, yToUV.yx * vec2(1., -1.)); vec2 disp = vec2(dot(xToUV, wave.xy * vec2(1., -1.)), dot(yToUV, wave.xy * vec2(-1., 1.))); - scrPos += disp * scale * displaceScale ; + scrPos += disp * scale * displaceScale * 4.; // check envelope length. // if the displaced location points the out of the water, diff --git a/Resources/Shaders/Water2.fs b/Resources/Shaders/Water2.fs index 27592c9a..b8034fd2 100644 --- a/Resources/Shaders/Water2.fs +++ b/Resources/Shaders/Water2.fs @@ -90,7 +90,7 @@ void main() { float scale = 1. / dot(xToUV.xy, yToUV.yx * vec2(1., -1.)); vec2 disp = vec2(dot(xToUV, wave.xy * vec2(1., -1.)), dot(yToUV, wave.xy * vec2(-1., 1.))); - scrPos += disp * scale * displaceScale ; + scrPos += disp * scale * displaceScale * 4.; // check envelope length. // if the displaced location points the out of the water,