accommodate inspector change
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / trail.fs
1 layout (location = 0) out vec4 oColour;
2 in float aAlpha;
3 uniform vec4 uColour;
4
5 #include "motion_vectors_fs.glsl"
6
7 void main(){
8 compute_motion_vectors();
9
10 vec2 ssuv = gl_FragCoord.xy;
11 vec3 vDither = vec3( dot( vec2( 171.0, 231.0 ), ssuv) );
12 float dither = fract( vDither.g / 71.0 ) - 0.5;
13
14 if( aAlpha+dither<0.5 )
15 discard;
16
17 oColour = vec4( uColour.rgb, uColour.a * aAlpha );
18 }