about summary refs log tree commit diff stats
path: root/apworld/client/vendor/LICENSE
diff options
context:
space:
mode:
Diffstat (limited to 'apworld/client/vendor/LICENSE')
0 files changed, 0 insertions, 0 deletions
56ede25abf6f'>^
224645d ^





1e8de01 ^

b538260 ^
0751446 ^
224645d ^






783b308 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35



                 
               
 

                           






                                                                   

           





                                          

                                                  
                            
                                    






                                           
 
#version 330 core

in vec2 UV;

out vec4 color;

uniform sampler2D clearTex;
uniform sampler2D blurTex;
uniform float iGlobalTime;

float nrand(vec2 n)
{
  return fract(sin(dot(n.xy, vec2(19.9898, 78.233))) * 43758.5453);
}

void main()
{
  vec3 mval = vec3(0.0);
  mval += texture(clearTex, UV).rgb / 2.0;
  mval += texture(blurTex, UV).rgb;
  mval = max(vec3(0.0), mval - 0.5);
  mval *= mval;

  float flicker =  0.5 + nrand(vec2(iGlobalTime));
  flicker *= (flicker);
  //flicker = sqrt(flicker);
  //flicker = pow(flicker, 1.0/8.0);
  //mval *= flicker;
  mval *= mix(vec3(0.0), mval, flicker);

  mval += texture(clearTex, UV).rgb;
  mval = clamp(mval, vec3(0.0), vec3(1.0));

  color = vec4(mval, 1.0);
}