Added Glitch Room Source code to Gitty

This commit is contained in:
Jeff Luke committed 2026-10-04 11:31:17 -07:00
commit 1ac9eb5644
505 files changed
+28504

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
shader_type canvas_item;
render_mode unshaded;
uniform bool animate_title = false;
uniform int palette_step = 0;
void fragment() {
vec4 pixel = texture(TEXTURE, UV) * COLOR;
// Only the supplied title lettering cycles; credits and sprites keep their palette.
if (animate_title && UV.x>0.13 && UV.x<0.86 && UV.y>0.20 && UV.y<0.49 && pixel.r>0.8 && pixel.b<0.1) {
vec3 palette[7] = vec3[7](vec3(1,0,0),vec3(1,0.5,0),vec3(1,1,0),vec3(0,1,0),vec3(0,1,1),vec3(1,0,1),vec3(1,1,1));
int index = (palette_step + (pixel.g>0.8 ? 2 : 0)) % 7;
pixel.rgb = palette[index];
}
COLOR = pixel;
}