1 uniform sampler2D uTexGarbage;
10 const vec3 uCamera = vec3(0.0);
12 #include "light_clearskies_stddef.glsl"
13 #include "common_world.glsl"
14 #include "motion_vectors_fs.glsl"
18 compute_motion_vectors();
20 vec3 rd = normalize(aNorm);
22 float fmove = g_time * 5.0;
23 vec2 cloudplane = (rd.xz / (rd.y*sign(rd.y))) * 0.025;
24 vec4 clouds1 = texture( uTexGarbage, cloudplane + vec2(0.1,0.4)*fmove*2.0 );
25 vec4 clouds2 = texture( uTexGarbage, cloudplane*2.0 + vec2(0.3,0.1)*fmove );
27 float cloud_d = max(clouds1.b*clouds2.r -0.2 - clouds2.g*0.4,0.0);
28 float cloud_e = pow(cloud_d,1.5)*pow(abs(rd.y),0.3)*2.0;
30 oColour = vec4( clearskies_sky( -rd ) ,1.0);
32 vec3 cloud_colour = mix( mix(g_nightsky_colour.rgb,vec3(1.0),g_day_phase),
33 g_sunset_colour.rgb, g_sunset_phase );
35 oColour.rgb = mix( oColour.rgb, cloud_colour, cloud_e );