advanced ska
This commit is contained in:
parent
fcca65922b
commit
df4ba3a11a
1 changed files with 8 additions and 2 deletions
|
@ -4,8 +4,9 @@ render_mode skip_vertex_transform;
|
|||
uniform vec4 color_1 : hint_color = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
uniform vec4 color_2 : hint_color = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
uniform vec2 checker_size = vec2(8.0, 8.0);
|
||||
uniform vec2 cycle_speed = vec2(0.0, 0.0);
|
||||
uniform vec2 pan_speed = vec2(0.0, 0.0);
|
||||
uniform vec2 cycle_speed = vec2(0.0, 0.0);
|
||||
uniform vec2 cycle_alternation = vec2(0.0, 0.0);
|
||||
uniform mat2 uv_transform = mat2(1.0);
|
||||
|
||||
float checker(vec2 uv) {
|
||||
|
@ -20,6 +21,11 @@ void vertex() {
|
|||
}
|
||||
|
||||
void fragment() {
|
||||
vec2 uv = uv_transform * (UV - pan_speed * TIME) - cycle_speed * TIME;
|
||||
vec2 uv = uv_transform * (UV - pan_speed * TIME);
|
||||
vec2 alternation = mix(vec2(1.0), vec2(
|
||||
(checker(vec2(uv.y, 0.0)) - 0.5) * 2.0,
|
||||
(checker(vec2(0.0, uv.x)) - 0.5) * 2.0
|
||||
), cycle_alternation);
|
||||
uv = uv - cycle_speed * alternation * TIME;
|
||||
COLOR = mix(color_1, color_2, checker(uv));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue