fix motion vectors going through gate
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / water.h
index 710d5c1fe0546f6fe5cf503b51b4945b8f134ec8..93dcba858e07048a0ecdba1a9247ffd05cceb3c3 100644 (file)
@@ -17,7 +17,7 @@ static struct vg_shader _shader_water = {
 "\n"
 "#line      2        0 \n"
 "#line       1        2 \n"
-"const float k_motion_lerp_amount = 0.05;\n"
+"const float k_motion_lerp_amount = 0.01;\n"
 "\n"
 "#line      2        0 \n"
 "\n"
@@ -26,6 +26,8 @@ static struct vg_shader _shader_water = {
 "\n"
 "void vs_motion_out( vec4 vproj0, vec4 vproj1 )\n"
 "{\n"
+"   // This magically solves some artifacting errors!\n"
+"   //\n"
 "   vproj1 = vproj0*(1.0-k_motion_lerp_amount) + vproj1*k_motion_lerp_amount;\n"
 "\n"
 "   aMotionVec0 = vec3( vproj0.xy, vproj0.w );\n"
@@ -189,7 +191,7 @@ static struct vg_shader _shader_water = {
 "\n"
 "#line     20        0 \n"
 "#line       1        2 \n"
-"const float k_motion_lerp_amount = 0.05;\n"
+"const float k_motion_lerp_amount = 0.01;\n"
 "\n"
 "#line      2        0 \n"
 "\n"