Skip to content

Commit

Permalink
Fix background filtering
Browse files Browse the repository at this point in the history
Should make it so that the background filtering follows the project default
  • Loading branch information
Jowan-Spooner committed Jul 11, 2024
1 parent 067f5c0 commit f72db6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions addons/dialogic/Modules/Background/subsystem_backgrounds.gd
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func _on_transition_finished(background_node:DialogicNode_BackgroundHolder, tran
background_node.color = Color.TRANSPARENT
transition_node.queue_free()


## Adds sub-viewport with the given background scene as child to
## Dialogic scene.
func add_background_node(scene:PackedScene, parent:DialogicNode_BackgroundHolder) -> SubViewportContainer:
Expand All @@ -166,6 +167,7 @@ func add_background_node(scene:PackedScene, parent:DialogicNode_BackgroundHolder
viewport.transparent_bg = true
viewport.disable_3d = true
viewport.render_target_update_mode = SubViewport.UPDATE_ALWAYS
viewport.canvas_item_default_texture_filter = ProjectSettings.get_setting("rendering/textures/canvas_textures/default_texture_filter")

viewport.add_child(b_scene)
b_scene.viewport = viewport
Expand All @@ -176,6 +178,7 @@ func add_background_node(scene:PackedScene, parent:DialogicNode_BackgroundHolder

return v_con


## Whether a background is set.
func has_background() -> bool:
return !dialogic.current_state_info.get('background_scene', '').is_empty() or !dialogic.current_state_info.get('background_argument','').is_empty()
Expand Down

0 comments on commit f72db6a

Please sign in to comment.