1 uniform sampler2D uTexGarbage;
2 uniform sampler2D uTexMain;
12 #include "common_world.glsl"
13 #include "motion_vectors_fs.glsl"
17 compute_motion_vectors();
19 vec3 vfrag = vec3(0.5,0.5,0.5);
20 vec4 vsamplemain = texture( uTexMain, aUv );
21 vec3 qnorm = normalize(aNorm);
23 vfrag = vsamplemain.rgb;
25 if( g_light_preview == 1 )
31 vec3 halfview = uCamera - aWorldCo;
32 float fdist = length( halfview );
35 vfrag = do_light_diffuse( vfrag, qnorm );
36 vfrag = do_light_spec( vfrag, qnorm, halfview, 0.1 );
37 vfrag = do_light_shadowing( vfrag );
38 vfrag = apply_fog( vfrag, fdist );
40 oColour = vec4(vfrag, 1.0);