Panning

Pans a texture in a direction specified by speed, automatically wraps

Uniforms:
Speed: The direction and speed of the panning (positive moves to the top left)

Shader code
shader_type canvas_item;

// --- Uniforms --- //
uniform vec2 speed = vec2(1.0, 0.0);

// --- Functions --- //
void fragment() {
	COLOR = texture(TEXTURE, mod(UV + TIME * speed, 1.0));
}
Tags
panning, scrolling, wrapping
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 KingToot

Invert Color

Radial Rainbow

Pixelize

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments