Squash and Stretch
An extremely simple implementation of a squash and stretch shader in Godot. Tested in Godot 4.0 Alpha 11.
Note: You may need a high-poly model.
Follow me on YouTube for Godot tutorials: https://www.youtube.com/c/ArcaneEnergy
Shader code
shader_type spatial;
uniform vec2 direction = vec2(1.0);
uniform float squash: hint_range(0.0, 2.0) = 1.0;
uniform float offset: hint_range(-0.5, 0.5) = 0.0;
void vertex() {
float v = abs(VERTEX.y + offset) * squash + direction.x;
VERTEX *= vec3(v, direction.y, v);
}