add motion vectors to all shaders
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / sky.fs
index ad050dba1142bb88383beb60cdad62e5795829a3..036f2445001ed8ccfddf0a2c9aee0cf165dda6da 100644 (file)
@@ -1,4 +1,4 @@
-out vec4 FragColor;
+layout (location = 0) out vec4 oColour;
 
 uniform vec4 uColour;
 uniform sampler2D uTexGarbage;
@@ -9,8 +9,12 @@ in vec2 aUv;
 in vec3 aNorm;
 in vec3 aCo;
 
+#include "motion_vectors_fs.glsl"
+
 void main()
 {
+   compute_motion_vectors();
+
    float fintensity = 1.0-(abs(aNorm.y)*0.7);
    float fblend = pow(fintensity,4.0);
    vec3 horizon = vec3( 0.8, 0.9, 0.9 );
@@ -29,5 +33,5 @@ void main()
    float fhorizon = step( aNorm.y * 0.5 + 0.5, 0.5 );
 
    vec3 skycomp = mix(diffuse, vec3(1.0,1.0,1.0), cloud_e);
-   FragColor = vec4(pow(skycomp, vec3(1.5)),1.0);
+   oColour = vec4(pow(skycomp, vec3(1.5)),1.0);
 }