movimiento en ondas 2d

efecto de movimiento suave .el video tiene mala resolucion pero en el juego no es asi

Shader code
shader_type canvas_item;

uniform float speed = 0.6;
uniform float scale_factor = 100.0;
uniform float distortion_intensity = 0.7;
uniform vec4 color1 : source_color = vec4(0.145,  0.145,  0.212, 1.0); // Morado
uniform vec4 color2 : source_color = vec4(0.145,  0.145,   0.212, 1.0); // Azul
uniform vec4 color3 : source_color = vec4(0.145,  0.145,   0.212, 1.0); // Rojo

void fragment() {
    vec2 uv = UV * scale_factor;
    float time = TIME * speed;
    
    // Distorsión con ruido
    uv.x += sin(uv.y * 5.0 + time * 2.0) * distortion_intensity;
    uv.y += cos(uv.x * 3.0 + time * 1.5) * distortion_intensity;
    
    // Patrón de colores psicodélicos
    float pattern = sin(uv.x * 2.0 + time) * cos(uv.y * 3.0 + time * 0.7);
    
    // Mezcla de colores
    vec3 col;
    if (pattern > 0.5) {
        col = mix(color1.rgb, color2.rgb, abs(sin(time * 0.5)));
    } else {
        col = mix(color2.rgb, color3.rgb, abs(cos(time * 0.3)));
    }
    
    // Añadir brillo en algunas zonas
    float glow = sin(uv.x * 10.0 + time * 2.0) * cos(uv.y * 8.0 + time * 1.2) * 0.5 + 0.5;
    col += glow * 0.2;
    
    COLOR = vec4(col, 1.0);
}
Live Preview
Tags
movimiento
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from izannnn

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments