-out vec4 FragColor;
-
uniform sampler2D uTexGarbage;
uniform sampler2D uTexGradients;
uniform vec3 uCamera;
-uniform vec4 uPlane;
in vec4 aColour;
in vec2 aUv;
in vec3 aNorm;
in vec3 aCo;
+in vec3 aWorldCo;
#include "common_world.glsl"
+#include "motion_vectors_fs.glsl"
void main()
{
+ compute_motion_vectors();
+
vec3 vfrag = vec3(0.5,0.5,0.5);
// ws modulation
- vec4 wgarbage = texture( uTexGarbage, aCo.xz * 0.160 );
+ vec4 wgarbage = vec4(0.5,0.5,0.5,1.0);//texture( uTexGarbage, aCo.xz * 0.160 );
// Creating normal patches
vec3 modnorm = (wgarbage.rgb-0.4) * 1.4;
}
// Lighting
- vec3 halfview = uCamera - aCo;
+ vec3 halfview = uCamera - aWorldCo;
float fdist = length( halfview );
halfview /= fdist;
vfrag = do_light_shadowing( vfrag );
vfrag = apply_fog( vfrag, fdist );
- FragColor = vec4(vfrag, 1.0 );
+ oColour = vec4(vfrag, 1.0 );
}