add rain sound + add time to screen
This commit is contained in:
@@ -10,8 +10,11 @@ var parameter_storage_buffer := RID()
|
||||
func _init() -> void:
|
||||
effect_callback_type = CompositorEffect.EFFECT_CALLBACK_TYPE_POST_OPAQUE
|
||||
rd = RenderingServer.get_rendering_device()
|
||||
if rd == null:
|
||||
return
|
||||
|
||||
RenderingServer.call_on_render_thread(_initialize_compute)
|
||||
|
||||
|
||||
var data := PackedFloat32Array()
|
||||
data.resize(20)
|
||||
data.fill(0)
|
||||
@@ -24,7 +27,7 @@ func _init() -> void:
|
||||
# alerts us we are about to be destroyed.
|
||||
func _notification(what: int) -> void:
|
||||
if what == NOTIFICATION_PREDELETE:
|
||||
if shader.is_valid():
|
||||
if rd != null and shader.is_valid():
|
||||
# Freeing our shader will also free any dependents such as the pipeline!
|
||||
rd.free_rid(shader)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user