baby lock the door and turn the lights down low
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / model_sky.fs
index 1439cdd03dae04360176010304c3441962b6f602..5fc28e5f6299f3ad4145014a00a5b4e75a7ccf13 100644 (file)
@@ -6,20 +6,19 @@ in vec3 aNorm;
 in vec3 aCo;
 in vec3 aWorldCo;
 
+// Spooky!
+const vec3 uCamera = vec3(0.0);
+
 #include "common_world.glsl"
 #include "motion_vectors_fs.glsl"
-#include "light_clearskies.glsl"
 
 void main()
 {
    compute_motion_vectors();
 
-   world_info world;
-   scene_state( g_time, world );
-
    vec3 rd = normalize(aNorm);
 
-   float fmove = g_time * 0.004;
+   float fmove = g_time * 5.0;
    vec2 cloudplane = (rd.xz / (rd.y*sign(rd.y))) * 0.025;
    vec4 clouds1 = texture( uTexGarbage, cloudplane + vec2(0.1,0.4)*fmove*2.0 );
    vec4 clouds2 = texture( uTexGarbage, cloudplane*2.0 + vec2(0.3,0.1)*fmove );
@@ -27,9 +26,10 @@ void main()
    float cloud_d = max(clouds1.b*clouds2.r -0.2 - clouds2.g*0.4,0.0);
    float cloud_e = pow(cloud_d,1.5)*pow(abs(rd.y),0.3)*2.0;
 
-   oColour = vec4( scene_sky( -rd, world ) ,1.0);
+   oColour = vec4( clearskies_sky( -rd ) ,1.0);
+
+   vec3 cloud_colour = mix( mix(g_nightsky_colour.rgb,vec3(1.0),g_day_phase), 
+                                g_sunset_colour.rgb, g_sunset_phase );
 
-   vec3 cloud_colour    = mix( mix(NIGHTSKY_COLOUR,vec3(1.0),world.day_phase), 
-                                    SUNSET_COLOUR, world.sunset_phase );
    oColour.rgb = mix( oColour.rgb, cloud_colour, cloud_e );
 }