3D Wobbly Effect (please delete >_<)

go to this one instead

Shader code
shader_type spatial;
uniform vec4 albedo : hint_color;
uniform sampler2D albedo_texture : hint_albedo;
uniform vec3 uv1_scale;
uniform vec3 uv1_offset;

uniform float brightness = 1.0;
uniform vec2 disp_scale = vec2(1.0,1.0); //Displacement map scale
uniform sampler2D flowMap; //Displacement map
uniform float strength = 1; //Force of the effect
uniform float speed = 1; //Speed of the effect

void vertex() {
	UV=UV*uv1_scale.xy+uv1_offset.xy;
}

void fragment() {
	float c = TIME * speed;
	vec4 offset = texture(flowMap, disp_scale.xy * vec2(UV.x + c, UV.y + c)) * strength;
	ALBEDO = brightness * albedo.rgb * texture(albedo_texture, (vec2(UV.x + offset.x, UV.y + offset.y) - vec2(0.5,0.5))).rgb;
}
Tags
wobble
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 Sqrt 2

3D Wobbly Effect

Related shaders

3D Wobbly Effect

Post Effect Outline Shader for GLES2

Sonar Effect Shader

guest

0 Comments
Inline Feedbacks
View all comments