class_name VignetteOverlay extends ColorRect ## Drop-in edge-dim overlay for pause/dialogue dim. §2: presentation. ## The ShaderMaterial (and, for the other two surfaces, its Palette-sourced ## uniforms) is built at runtime in _ready() rather than baked into the .tscn ## (deliberate deviation from spec §5.4's "baked" approach) — keeps Palette the ## single source of truth at the cost of an editor preview; the surface renders ## once the scene runs. func _ready() -> void: color = Color(0, 0, 0, 0) # base transparent; shader draws the dim mouse_filter = Control.MOUSE_FILTER_IGNORE var m := ShaderMaterial.new() m.shader = load("res://assets/theme/shaders/vignette.gdshader") material = m