Размер видео: 1280 X 720853 X 480640 X 360
Показать панель управления
Автовоспроизведение
Автоповтор
Happy New Year! 🥳
Thank you. 😎
shader_type canvas_item;uniform vec2 resoultion = vec2(600.0,400.0);uniform vec3 color: source_color = vec3(0.0, 0.3, 0.9);uniform float speed: hint_range(0.0, 1.0, 0.01) = 0.5;uniform bool clamped = false;struct MetaBall { float radius; float freq; float amp;};const MetaBall[] balls = { MetaBall(0.2, 2.0, 0.9), MetaBall(0.5, 1.0, 0.2), MetaBall(0.1, 0.2, 0.7) };float ball(vec2 uv, float radius) { return radius / dot(uv,uv);}void fragment() { vec2 uv = UV - 0.5; uv.x *= resoultion.x / resoultion.y; uv *= 2.0; float result = 1.0; for (int i = 0; i < balls.length(); i++) { float dir = mod(float(i), 2) * 2.0 - 1.0; MetaBall b = balls[i]; vec2 offset = vec2( sin(TIME * b.freq * speed) * b.amp, cos(TIME * b.freq * speed) * b.amp * dir ); result *= ball(uv + offset, b.radius); } if (clamped) { result = clamp(result, 0.0, 1.0); } COLOR = vec4(result * color, 1.0);}
👍🏽
@@FencerDevLog Thank you so much man you uploaded the video few minutes right before i started searching for one haha
@@gatheesha22 Nice! And you are welcome. 😎
Happy New Year! 🥳
Thank you. 😎
shader_type canvas_item;
uniform vec2 resoultion = vec2(600.0,400.0);
uniform vec3 color: source_color = vec3(0.0, 0.3, 0.9);
uniform float speed: hint_range(0.0, 1.0, 0.01) = 0.5;
uniform bool clamped = false;
struct MetaBall {
float radius;
float freq;
float amp;
};
const MetaBall[] balls = {
MetaBall(0.2, 2.0, 0.9),
MetaBall(0.5, 1.0, 0.2),
MetaBall(0.1, 0.2, 0.7)
};
float ball(vec2 uv, float radius) {
return radius / dot(uv,uv);
}
void fragment() {
vec2 uv = UV - 0.5;
uv.x *= resoultion.x / resoultion.y;
uv *= 2.0;
float result = 1.0;
for (int i = 0; i < balls.length(); i++) {
float dir = mod(float(i), 2) * 2.0 - 1.0;
MetaBall b = balls[i];
vec2 offset = vec2(
sin(TIME * b.freq * speed) * b.amp,
cos(TIME * b.freq * speed) * b.amp * dir
);
result *= ball(uv + offset, b.radius);
}
if (clamped) {
result = clamp(result, 0.0, 1.0);
}
COLOR = vec4(result * color, 1.0);
}
👍🏽
@@FencerDevLog Thank you so much man you uploaded the video few minutes right before i started searching for one haha
@@gatheesha22 Nice! And you are welcome. 😎