mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Transparent canvas now works properly with scaled UI
This commit is contained in:
parent
dbc8873d17
commit
9128b455e6
|
@ -18,6 +18,9 @@ func _on_main_canvas_visibility_changed() -> void:
|
|||
|
||||
func update_transparent_shader() -> void:
|
||||
# Works independently of the transparency feature
|
||||
var canvas_size: Vector2 = (main_canvas_container.rect_size - Vector2.DOWN * 2) * Global.shrink
|
||||
material.set("shader_param/screen_resolution", get_viewport().size)
|
||||
material.set("shader_param/position", main_canvas_container.rect_global_position)
|
||||
material.set("shader_param/size", main_canvas_container.rect_size - Vector2.ONE * 2)
|
||||
material.set(
|
||||
"shader_param/position", main_canvas_container.rect_global_position * Global.shrink
|
||||
)
|
||||
material.set("shader_param/size", canvas_size)
|
||||
|
|
Loading…
Reference in a new issue