3D Wobbly Effect

Based highly on RoughSkin’s shader, but modified for spatial objects. Use a clouds texture for the displacement for the best results.

(for some reason I cannot delete the accidental duplicate of this shader I made, oof…)

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;
	//ALPHA = albedo.a * texture(albedo_texture, (vec2(UV.x + offset.x, UV.y + offset.y) - vec2(0.5,0.5))).a;
	ALBEDO = brightness * albedo.rgb * texture(albedo_texture, (vec2(UV.x + offset.x, UV.y + offset.y) - vec2(0.5,0.5))).rgb;
}
Tags
sketch, wobble, wobbly
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 (please delete >_<)

Related shaders

3D Wobbly Effect (please delete >_<)

Post Effect Outline Shader for GLES2

Sonar Effect Shader

guest

0 Comments
Inline Feedbacks
View all comments