fix snow and rain for grass
This commit is contained in:
@@ -89,7 +89,6 @@ func _apply_wind_noise_to_node(node: Node, noise_tex: Texture2D) -> void:
|
||||
|
||||
func ApplyWeatherShaderToMaterials():
|
||||
var weather_shader = preload("res://core/daynight/weather_overlay.tres")
|
||||
|
||||
for node in get_tree().get_nodes_in_group("weather_node"):
|
||||
if node is GeometryInstance3D:
|
||||
node.material_overlay = weather_shader
|
||||
@@ -97,14 +96,17 @@ func ApplyWeatherShaderToMaterials():
|
||||
for child in node.get_children():
|
||||
if child is GeometryInstance3D:
|
||||
child.material_overlay = weather_shader
|
||||
break
|
||||
|
||||
var weather_plain_shader = preload("res://core/daynight/weather_plain_shader.tres")
|
||||
for node in get_tree().get_nodes_in_group("weather_vegetables_node"):
|
||||
if node is GeometryInstance3D:
|
||||
node.material_overlay = weather_shader
|
||||
node.material_overlay = weather_plain_shader
|
||||
else:
|
||||
for child in node.get_children():
|
||||
if child is GeometryInstance3D:
|
||||
child.material_overlay = weather_shader
|
||||
child.material_overlay = weather_plain_shader
|
||||
break
|
||||
|
||||
func select_day_time(normalized_time: float) -> void:
|
||||
#set show_day_time_debug = true to show debug on screen
|
||||
|
||||
Reference in New Issue
Block a user