56593c58cf
Show touch controls only on touch platforms and keyboard hints only on desktop, via a shared Controls.use_touch_ui() gate (is_touchscreen_available is unreliable with emulate_touch_from_mouse). Bumps version to 0.2.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
26 lines
1.0 KiB
Plaintext
26 lines
1.0 KiB
Plaintext
shader_type canvas_item;
|
|
|
|
// Blurred, darkened backdrop for the intro video. A COVER-scaled copy of the
|
|
// clip sits behind the sharp fitted clip so portrait/ultrawide screens fill
|
|
// edge-to-edge instead of showing dead bars.
|
|
|
|
uniform float blur_radius : hint_range(0.0, 8.0) = 3.0;
|
|
uniform float darken : hint_range(0.0, 1.0) = 0.35;
|
|
|
|
void fragment() {
|
|
vec2 px = TEXTURE_PIXEL_SIZE * blur_radius;
|
|
vec4 sum = vec4(0.0);
|
|
// 3x3 gaussian-ish tap, weights sum to 16.
|
|
sum += texture(TEXTURE, UV + vec2(-px.x, -px.y)) * 1.0;
|
|
sum += texture(TEXTURE, UV + vec2(0.0, -px.y)) * 2.0;
|
|
sum += texture(TEXTURE, UV + vec2(px.x, -px.y)) * 1.0;
|
|
sum += texture(TEXTURE, UV + vec2(-px.x, 0.0)) * 2.0;
|
|
sum += texture(TEXTURE, UV) * 4.0;
|
|
sum += texture(TEXTURE, UV + vec2(px.x, 0.0)) * 2.0;
|
|
sum += texture(TEXTURE, UV + vec2(-px.x, px.y)) * 1.0;
|
|
sum += texture(TEXTURE, UV + vec2(0.0, px.y)) * 2.0;
|
|
sum += texture(TEXTURE, UV + vec2(px.x, px.y)) * 1.0;
|
|
sum /= 16.0;
|
|
COLOR = vec4(sum.rgb * (1.0 - darken), sum.a);
|
|
}
|