add snow coverage to tea material
This commit is contained in:
@@ -135,7 +135,7 @@ func _apply_dynamic_environment_materials(node: Node) -> void:
|
||||
if node.is_in_group("weather_node"):
|
||||
_apply_weather_overlay_to_node(node, WEATHER_SHADER)
|
||||
|
||||
if node.is_in_group("weather_vegetables_node"):
|
||||
if _should_clear_weather_overlay(node):
|
||||
_clear_weather_overlay_from_node(node)
|
||||
|
||||
func ApplyWindNoiseToMaterials():
|
||||
@@ -162,10 +162,11 @@ func ApplyWeatherShaderToMaterials():
|
||||
_apply_weather_overlay_to_node(node, WEATHER_SHADER)
|
||||
|
||||
for node in get_tree().get_nodes_in_group("weather_vegetables_node"):
|
||||
_clear_weather_overlay_from_node(node)
|
||||
if _should_clear_weather_overlay(node):
|
||||
_clear_weather_overlay_from_node(node)
|
||||
|
||||
func _apply_weather_overlay_to_node(node: Node, material: Material) -> void:
|
||||
if node.is_in_group("weather_vegetables_node"):
|
||||
if _should_clear_weather_overlay(node):
|
||||
_clear_weather_overlay_from_node(node)
|
||||
return
|
||||
|
||||
@@ -210,6 +211,9 @@ func _shader_material_uses_alpha_texture(material: ShaderMaterial) -> bool:
|
||||
|
||||
return material.shader.code.find("alpha_texture") != -1
|
||||
|
||||
func _should_clear_weather_overlay(node: Node) -> bool:
|
||||
return node.is_in_group("weather_vegetables_node")
|
||||
|
||||
func select_day_time(normalized_time: float) -> void:
|
||||
#set show_day_time_debug = true to show debug on screen
|
||||
#normalized_time is a value between 0 and 1; the time of the day is calculate as "normalized_time" * 1440; day_time is the step to pass from sunrise, to day, to sunset, to night
|
||||
|
||||
Reference in New Issue
Block a user