Tune and optimize boss encounter
This commit is contained in:
parent
40f284dcdd
commit
68985316e5
16 changed files with 316 additions and 88 deletions
|
|
@ -1,8 +1,9 @@
|
|||
[gd_resource type="Resource" script_class="PlanetSurfaceProfile" load_steps=4 format=3]
|
||||
[gd_resource type="Resource" script_class="PlanetSurfaceProfile" load_steps=5 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://surface/PlanetSurfaceProfile.gd" id="1"]
|
||||
[ext_resource type="Shader" path="res://shaders/boss_surface.gdshader" id="2"]
|
||||
[ext_resource type="Shader" path="res://shaders/lunar_tiled.gdshader" id="2"]
|
||||
[ext_resource type="PackedScene" path="res://boss/BossEncounter.tscn" id="3"]
|
||||
[ext_resource type="Texture2D" path="res://surface/boss_membrane.svg" id="4"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1")
|
||||
|
|
@ -11,6 +12,7 @@ encounter_scene = ExtResource("3")
|
|||
editor_visible = false
|
||||
show_capture_status = false
|
||||
background_shader = ExtResource("2")
|
||||
background_field_texture = ExtResource("4")
|
||||
base_color = Color(0.055, 0.008, 0.05, 1)
|
||||
crater_color = Color(0.16, 0.018, 0.10, 1)
|
||||
highlight_color = Color(0.16, 0.66, 0.72, 1)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ extends Resource
|
|||
# the game and the setup editor drift apart, since each scene "already had" a
|
||||
# different shader. SurfaceBackground.apply_profile() is the only consumer.
|
||||
@export var background_shader: Shader = null
|
||||
# Optional ready-made field for a tiled background shader. Procedural rocky
|
||||
# terrain still bakes once; authored surfaces can avoid both that load spike
|
||||
# and all per-frame procedural fragment work by shipping their tile directly.
|
||||
@export var background_field_texture: Texture2D = null
|
||||
@export var base_color: Color = Color(0.75, 0.75, 0.76, 1.0)
|
||||
@export var crater_color: Color = Color(0.44, 0.44, 0.45, 1.0)
|
||||
@export var highlight_color: Color = Color(0.89, 0.89, 0.9, 1.0)
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
|||
22
surface/boss_membrane.svg
Normal file
22
surface/boss_membrane.svg
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
|
||||
<rect width="512" height="512" fill="#21061c"/>
|
||||
<g fill="#451139" opacity="0.5">
|
||||
<ellipse cx="112" cy="116" rx="104" ry="78"/>
|
||||
<ellipse cx="374" cy="350" rx="126" ry="96"/>
|
||||
<ellipse cx="246" cy="246" rx="72" ry="118" opacity="0.42"/>
|
||||
</g>
|
||||
<g fill="none" stroke-linecap="round">
|
||||
<path d="M0 68 C120 18 164 128 268 76 S420 20 512 68" stroke="#2b6972" stroke-width="7" opacity="0.42"/>
|
||||
<path d="M0 260 C102 214 176 324 282 270 S420 214 512 260" stroke="#245d68" stroke-width="6" opacity="0.35"/>
|
||||
<path d="M0 452 C118 402 170 506 276 460 S418 404 512 452" stroke="#2b6972" stroke-width="6" opacity="0.38"/>
|
||||
<path d="M94 0 C46 116 152 178 102 286 S46 420 94 512" stroke="#326f76" stroke-width="6" opacity="0.34"/>
|
||||
<path d="M354 0 C300 102 410 180 356 276 S304 416 354 512" stroke="#285f69" stroke-width="7" opacity="0.4"/>
|
||||
</g>
|
||||
<g fill="#55a9ae" opacity="0.3">
|
||||
<circle cx="268" cy="76" r="8"/>
|
||||
<circle cx="282" cy="270" r="7"/>
|
||||
<circle cx="276" cy="460" r="8"/>
|
||||
<circle cx="102" cy="286" r="7"/>
|
||||
<circle cx="356" cy="276" r="9"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
43
surface/boss_membrane.svg.import
Normal file
43
surface/boss_membrane.svg.import
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bajkflkc0r3cp"
|
||||
path="res://.godot/imported/boss_membrane.svg-6482a210571f1472430bfb4ecba98f3c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://surface/boss_membrane.svg"
|
||||
dest_files=["res://.godot/imported/boss_membrane.svg-6482a210571f1472430bfb4ecba98f3c.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
Loading…
Reference in a new issue