idk

idk

 

Shader code
shader_type canvas_item;

shader_type canvas_item;

uniform vec4 color_gap: hint_color = vec4(0.25);
uniform vec4 color_stripe: hint_color = vec4(1.0, 0.75, 0.0, 1.0);
uniform float divisions = 8.0; // increase for more stripe density
uniform float stripe_bias = 2.5; // 1.0 means no stripes; 2.0 means stripes and gaps are equal size
uniform float speed = 0.1;
uniform float angle = 0.7854; // in radians

void fragment() {
	float w = cos(angle) * UV.x + sin(angle) * UV.y - speed * TIME;
	if (floor(mod(w * divisions, stripe_bias)) < 0.0001) {
		COLOR = color_gap;
	} else {
		COLOR = color_stripe;
	}
}

uniform vec4 color_gap: hint_color = vec4(0.25);
uniform vec4 color_stripe: hint_color = vec4(1.0, 0.75, 0.0, 1.0);
uniform float divisions = 8.0; // increase for more stripe density
uniform float stripe_bias = 2.5; // 1.0 means no stripes; 2.0 means stripes and gaps are equal size
uniform float speed = 0.1;
uniform float angle = 0.7854; // in radians

void fragment() {
	float w = cos(angle) * UV.x + sin(angle) * UV.y - speed * TIME;
	if (floor(mod(w * divisions, stripe_bias)) < 0.0001) {
		COLOR = color_gap;
	} else {
		COLOR = color_stripe;
	}
}
Tags
uh
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.
guest

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
xananax
xananax
16 days ago

This is a copy-paste (twice!) of https://godotshaders.com/shader/animated-stripes/, with nothing changed other than the shader being repeated twice.

It probably should be removed