Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @include "shaders/common.glsl"
- in vec4 v_color;
- in vec2 v_local_uv;
- in vec3 v_frag_pos;
- in vec4 v_frag_pos_light_space;
- in flat vec2 v_size;
- out vec4 f_color;
- uniform float time;
- layout (binding = 1) uniform sampler2D in_noise;
- void main()
- {
- vec2 uv = v_local_uv;
- float n = texture(in_noise, v_local_uv).r;
- n = pow(n, 2.0);
- uv = uv * 2.0 - 1.0;
- vec2 uv2 = abs(uv);
- vec3 color0 = vec3(0.111765, 0.315686, 0.601961) * 0.25;
- vec3 color1 = vec3(0.32, 0.32, 0.69) * 0.25;
- float y_offset = (step(0.5, v_local_uv.y) + 1.0) * 12.4;
- float s2 = sin(uv.x * 10.0 + time + y_offset) * 0.1;
- float s3 = sin(uv.x * 33.0 + time + y_offset) * 0.05;
- float s4 = sin(uv.x * 51.2 + time + y_offset) * 0.025;
- uv2.y += s2 + s3 + s4;
- uv2.y += n * 1.0;
- float s = smoothstep(0.5, 1.0, uv2.y);
- float alpha_multi = sin_range(time * 20, 0.7, 1.0);
- f_color = mix(vec4(color1, 0.0), vec4(color0, alpha_multi), s);
- f_color = pma(f_color);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement