X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=shaders%2Fsky.fs;h=036f2445001ed8ccfddf0a2c9aee0cf165dda6da;hb=0a40a20806ec52fc13817fd78a43793de5e32ffa;hp=435b2703cea5347d459cfb952fd6025e7889b0e8;hpb=3bb0287d544a4cb75de9afe2927ac8e946f3a18e;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/shaders/sky.fs b/shaders/sky.fs index 435b270..036f244 100644 --- a/shaders/sky.fs +++ b/shaders/sky.fs @@ -1,4 +1,4 @@ -out vec4 FragColor; +layout (location = 0) out vec4 oColour; uniform vec4 uColour; uniform sampler2D uTexGarbage; @@ -9,10 +9,14 @@ 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,8.0); + float fblend = pow(fintensity,4.0); vec3 horizon = vec3( 0.8, 0.9, 0.9 ); vec3 skycolour = vec3( 0.5, 0.6, 0.9 ); vec3 diffuse = mix( skycolour, horizon, fblend ); @@ -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(skycomp,1.0); + oColour = vec4(pow(skycomp, vec3(1.5)),1.0); }