Files
code_of_conquest_dnd/client/assets/theme/shaders/dark_bay.gdshader
2026-07-10 20:34:52 -05:00

17 lines
607 B
Plaintext

shader_type canvas_item;
uniform vec4 stripe_a : source_color;
uniform vec4 stripe_b : source_color;
uniform float band_px = 16.0; // 16px bands per README
uniform float vignette = 0.55; // edge darkening strength
void fragment() {
// 135deg diagonal stripe: sum of pixel coords, banded.
vec2 px = FRAGCOORD.xy;
float diag = px.x + px.y;
float band = mod(floor(diag / band_px), 2.0);
vec4 base = mix(stripe_a, stripe_b, band);
// radial vignette centred slightly high (README: 50% 38%).
float d = distance(UV, vec2(0.5, 0.38));
base.rgb *= 1.0 - clamp(d * vignette, 0.0, 1.0);
COLOR = base;
}