1 uniform sampler2D uTexMain;
12 #include "common_world.glsl"
13 #include "motion_vectors_fs.glsl"
17 compute_motion_vectors();
19 vec3 vfrag = texture( uTexMain, aUv ).rgb;
22 vec3 halfview = uCamera - aWorldCo;
23 float fdist = length( halfview );
27 vec3 qnorm = normalize(floor(aNorm*2.0)*0.5) + vec3(0.001,0.0,0.0);
29 vec3 total_light = newlight_compute_ambient();
30 vec3 world_light = newlight_compute_world_diffuse( qnorm );
32 float world_shadow = newlight_compute_sun_shadow();
33 total_light += world_light * world_shadow;
35 vfrag = apply_fog( vfrag * total_light, fdist );
37 float opacity = clamp( fdist*fdist, 0.0, 1.0 );
38 oColour = vec4(vfrag,opacity);