Преглед на файлове

Fix VRAM leak in compositor effect demo (#1115)

Raymond DiDonato преди 10 месеца
родител
ревизия
a87fded4cf
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      compute/post_shader/post_process_grayscale.gd
  2. 1 1
      compute/post_shader/post_process_shader.gd

+ 1 - 1
compute/post_shader/post_process_grayscale.gd

@@ -19,7 +19,7 @@ func _notification(what: int) -> void:
 	if what == NOTIFICATION_PREDELETE:
 		if shader.is_valid():
 			# Freeing our shader will also free any dependents such as the pipeline!
-			RenderingServer.free_rid(shader)
+			rd.free_rid(shader)
 
 
 #region Code in this region runs on the rendering thread.

+ 1 - 1
compute/post_shader/post_process_shader.gd

@@ -58,7 +58,7 @@ func _notification(what: int) -> void:
 	if what == NOTIFICATION_PREDELETE:
 		if shader.is_valid():
 			# Freeing our shader will also free any dependents such as the pipeline!
-			RenderingServer.free_rid(shader)
+			rd.free_rid(shader)
 
 
 #region Code in this region runs on the rendering thread.