replace noise with tileable perlin; use pixel-space sampling for fixed scale
This commit is contained in:
parent
9adba9d6c2
commit
d636d0f847
4 changed files with 170 additions and 1 deletions
|
|
@ -31,9 +31,20 @@ func get_module_title() -> String:
|
|||
func _initialize() -> void:
|
||||
_initialized = true
|
||||
initialize()
|
||||
resized.connect(_update_noise_size)
|
||||
_update_noise_size()
|
||||
module_ready.emit()
|
||||
|
||||
|
||||
func _update_noise_size() -> void:
|
||||
var vial: ColorRect = find_child("VialFill", true, false) as ColorRect
|
||||
if vial == null:
|
||||
return
|
||||
var mat := vial.material as ShaderMaterial
|
||||
if mat and size.x > 0 and size.y > 0:
|
||||
mat.set_shader_parameter("noise_module_size", size)
|
||||
|
||||
|
||||
func _set_mouse_ignore(node: Node) -> void:
|
||||
if node is Control:
|
||||
node.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue