Skip to content

Commit

Permalink
Merge pull request #8 from SAED2906/main
Browse files Browse the repository at this point in the history
Made shader materials unique.
  • Loading branch information
ItsKorin authored Apr 14, 2024
2 parents df61c1e + c2522f8 commit 2a8550b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions addons/post_processing/node/post_process.gd
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@ func _enter_tree():
_update_shaders()

func _add_canvas_layer_children(_path : String, _name: String) -> void:
add_child(load(_path).instantiate())
print_debug("Successfully added child canvas-layer: " + _name + " to PostProcess adddon node.")
var child_instance = load(_path).instantiate()
add_child(child_instance)
var material_instance = child_instance.get_children()[0].material.duplicate()
child_instance.get_children()[0].material = material_instance
print_debug("Successfully added child canvas-layer: " + _name + " to PostProcess addon node.")

func _process(delta):
if not configuration:
Expand Down

0 comments on commit 2a8550b

Please sign in to comment.