X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fgpos.h;h=2f4440db78c899b68542ce010f21595c7c5394fc;hb=1142fd5c27cf6d5bef073969b55e20b160646164;hp=b60fb758deddf2bd360f05e5c9964ba0b6a1d39b;hpb=f7db507815e2822d971031c30f25e02b45e9c914;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/gpos.h b/shaders/gpos.h index b60fb75..2f4440d 100644 --- a/shaders/gpos.h +++ b/shaders/gpos.h @@ -17,11 +17,19 @@ static struct vg_shader _shader_gpos = { "\n" "#line 2 0 \n" "#line 1 2 \n" +"const float k_motion_lerp_amount = 0.01;\n" +"\n" +"#line 2 0 \n" +"\n" "out vec3 aMotionVec0;\n" "out vec3 aMotionVec1;\n" "\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" " aMotionVec1 = vec3( vproj1.xy, vproj1.w );\n" "}\n"