Tune and optimize boss encounter

This commit is contained in:
Loïc Wisniewski 2026-09-03 11:49:51 +02:00
commit 68985316e5
16 changed files with 316 additions and 88 deletions

View file

@ -50,6 +50,7 @@ var camera: Camera2D = null
# differing only in colour, so keying on the shader alone would show void's
# palette with rocky's crater texture.
var _baked_key: Array = []
var _provided_field_texture: Texture2D = null
# Applies a surface profile to this backdrop: which shader draws it, and the
@ -68,9 +69,14 @@ func apply_profile(profile: Resource) -> void:
highlight_color = profile.highlight_color
if profile.background_shader != null:
material.shader = profile.background_shader
_provided_field_texture = profile.background_field_texture
material.set_shader_parameter("base_color", base_color)
material.set_shader_parameter("crater_color", crater_color)
material.set_shader_parameter("highlight_color", highlight_color)
if _provided_field_texture != null and _material_wants_baked_field():
material.set_shader_parameter("field_texture", _provided_field_texture)
_baked_key = [material.shader, _provided_field_texture]
return
_bake_field()