Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //MIT LICENSE
- //Discord - wospy#3232
- shader_type canvas_item;
- uniform float global_speed =0.7;
- float map(float min, float max, float value) {
- return min + (max - min) * value;
- }
- void fragment(){
- float weight11_speed =14.0/13.0*global_speed;
- float weight12_speed =20.0/19.0*global_speed;
- float weight21_speed =38.0/37.0*global_speed;
- float weight22_speed =24.0/23.0*global_speed;
- float step1_speed =3.0*8.0/ 7.0*global_speed;
- float step2_speed =2.0*12.0/11.0*global_speed;
- float step3_speed =18.0/17.0*global_speed;
- vec2 uv = SCREEN_UV;
- float range = 0.0419+TIME/10000.0;
- float magical_power=sin(uv.y * 3.141592+TIME)*cos(uv.x*3.141592+TIME)*0.7;
- vec2 trippyUv = vec2(uv.x + map(-range, range, smoothstep(0.0, 1.0, abs(fract(TIME * 0.320)*2.0-1.0))) * magical_power, uv.y+ map(-range, range, smoothstep(0.0, 1.0, abs(fract(TIME * 0.320)*2.0-1.0))) * magical_power);
- vec4 trippyColor = textureLod(SCREEN_TEXTURE, trippyUv,0.0);
- float weight0 = 1.0;
- float weight1 = sin(TIME * weight11_speed) + sin(TIME * weight12_speed);
- float weight2 = (sin(TIME * weight21_speed) + sin(TIME * weight22_speed))/2.0;
- float weight3 = 1.0 - weight1 - weight2 - weight0;
- float step0 = 0.0;
- float step1 = sin(TIME * step1_speed)+2.0;
- float step2 = sin(TIME * step2_speed)*2.0+3.0;
- float step3 = sin(TIME * step3_speed)*2.0+5.0;
- vec4 pixel0 = textureLod(SCREEN_TEXTURE, trippyUv, step0) * weight0;
- vec4 pixel1 = textureLod(SCREEN_TEXTURE, trippyUv, step1) * weight1;
- vec4 pixel2 = textureLod(SCREEN_TEXTURE, trippyUv, step2) * weight2;
- vec4 pixel3 = textureLod(SCREEN_TEXTURE, trippyUv, step3) * weight3;
- COLOR = pixel0 + pixel1 + pixel2 + pixel3;
- //vec4 tt=textureLod(SCREEN_TEXTURE,uv,0);
- //COLOR=tt;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement