5 uniform vec2 OutputSize;
8 float baseScale = 1.25;
14 return fract(
sin(
dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);
17 float dist_func(vec2 distv)
19 float dist =
sqrt((distv.x * distv.x) + (distv.y * distv.y)) * (40.0 / baseScale);
20 dist =
clamp(dist, 0.0, 1.0);
21 return cos(dist * (3.14159265358 * 0.5)) * 0.5;
24 float random_dots(vec2 co)
26 float part = 1.0 / 20.0;
30 if (
p > 0.005 * (density * 40.0))
33 vec2 dpos = (vec2(fract(
p * 2.0) ,
p) + vec2(2.0, 2.0)) * 0.25;
35 vec2 cellpos = fract(co / part);
36 vec2 distv = (cellpos - dpos);
38 return dist_func(distv);
41 float snow(vec2 pos,
float time,
float scale)
44 pos.x +=
cos(pos.y * 1.2 +
time * 3.14159 * 2.0 + 1.0 /
scale) / (8.0 /
scale) * 4.0;
46 pos +=
time *
scale * vec2(-0.5, 1.0) * 4.0;
47 return random_dots(pos /
scale) * (
scale * 0.5 + 0.5);
52 float tim =
time * 0.4 * speed;
60 a += snow(pos, tim, 1.0);
61 a += snow(pos, tim, 0.7);
62 a += snow(pos, tim, 0.6);
63 a += snow(pos, tim, 0.5);
64 a += snow(pos, tim, 0.4);
65 a += snow(pos, tim, 0.3);
66 a += snow(pos, tim, 0.25);
67 a += snow(pos, tim, 0.125);
68 a =
a * min(pos.y * 4.0, 1.0);
69 FragColor = vec4(1.0, 1.0, 1.0,
a);
static const char * stock_fragment_xmb_simple_snow_core
Definition: core_pipeline_snow_simple.glsl.frag.h:3
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:9939
struct passwd out
Definition: missing_libc_functions.c:51
#define floor(x)
Definition: math.h:25
#define sqrt(x)
Definition: math.h:26
#define GLSL(src)
Definition: shaders_common.h:10
#define gl_FragCoord
Definition: internal_interface.hpp:357
std::shared_ptr< Ope > dot()
Definition: peglib.h:1603
time_t time(time_t *timer)
GLenum clamp
Definition: glext.h:6856
GLfloat GLfloat p
Definition: glext.h:9809
#define sin(x)
Definition: math.h:23
int main(int argc, char *argv[])
Definition: send-presence.c:197
#define cos(x)
Definition: math.h:21
def cd(new_dir)
Definition: build.py:40
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844