Player now has 2 cameras (one true, one masked), each with a viewport, which the shader alternates between based on the Pill factor.
8 lines
218 B
GDScript
8 lines
218 B
GDScript
extends Spatial
|
|
|
|
|
|
onready var screen_texture = get_node("ScreenTexture") as ColorRect
|
|
|
|
|
|
func _process(delta: float) -> void:
|
|
screen_texture.material.set_shader_param("mask_factor", Pills.get_level() / Pills.get_max()) |