updates
This commit is contained in:
parent
0cba7f5ee0
commit
32ed347b58
172 changed files with 5464 additions and 582 deletions
16
ui/scanlines.gdshader
Normal file
16
ui/scanlines.gdshader
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
// The CRT texture of the print templates' terminals (ui-plan.md §2): dark lines 2 px of every 4,
|
||||
// laid over a ChamferBox panel. A StyleBox can't carry a shader, so this goes on a ColorRect on top.
|
||||
|
||||
uniform float strength : hint_range(0.0, 1.0) = 0.16;
|
||||
uniform float period = 4.0;
|
||||
// A faint moving band, as on an old monitor; 0 turns it off.
|
||||
uniform float roll = 0.04;
|
||||
|
||||
void fragment() {
|
||||
float line = step(mod(FRAGCOORD.y, period), period * 0.5);
|
||||
float band = roll * smoothstep(0.0, 1.0, sin(FRAGCOORD.y * 0.012 - TIME * 1.7) * 0.5 + 0.5);
|
||||
COLOR = vec4(0.0, 0.0, 0.0, strength * line - band * 0.5);
|
||||
COLOR.a = max(COLOR.a, 0.0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue