Convert demos to Godot 4 using regular expressions in a script

This commit is contained in:
Aaron Franke
2022-03-26 05:00:50 -05:00
parent 410d783126
commit bbe50fc9da
1095 changed files with 13628 additions and 13557 deletions

View File

@@ -0,0 +1,13 @@
shader_type canvas_item;
uniform float rotation = 3.0;
void fragment() {
vec2 uv = SCREEN_UV;
vec2 rel = uv - vec2(0.5, 0.5);
float angle = length(rel) * rotation;
mat2 rot = mat2(vec2(cos(angle), -sin(angle)), vec2(sin(angle), cos(angle)));
rel = rot * rel;
uv = clamp(rel + vec2(0.5,0.5), vec2(0.0, 0.0), vec2(1.0, 1.0));
COLOR.rgb = textureLod(SCREEN_TEXTURE, uv, 0.0).rgb;
}