Compare commits
5 commits
0076996d39
...
dbe0a7b313
| Author | SHA1 | Date | |
|---|---|---|---|
| dbe0a7b313 | |||
| 8bc800de36 | |||
| 552af7a58c | |||
| 405bdaa2d2 | |||
| 3576daba16 |
|
Before Width: | Height: | Size: 277 KiB After Width: | Height: | Size: 246 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
BIN
art/exported/characters/patterns/fox/head_round_fox.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bwiwt76kyyevw"
|
||||||
|
path="res://.godot/imported/head_round_fox.png-27dc2125a4e5b85a622291762225a303.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://art/exported/characters/patterns/fox/head_round_fox.png"
|
||||||
|
dest_files=["res://.godot/imported/head_round_fox.png-27dc2125a4e5b85a622291762225a303.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=false
|
||||||
|
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
|
||||||
|
|
@ -175,10 +175,11 @@ authored `mesh_style.png` filenames.
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| Bengal spots, body and arms | `body_arms_bengal.png` | `art/exported/characters/patterns/bengal/body_arms_bengal.png` | `fa90bd4e74b0b770ce97bf69d069676f5d4bd1f5d649f89e09638a66b61a8470` |
|
| Bengal spots, body and arms | `body_arms_bengal.png` | `art/exported/characters/patterns/bengal/body_arms_bengal.png` | `fa90bd4e74b0b770ce97bf69d069676f5d4bd1f5d649f89e09638a66b61a8470` |
|
||||||
| Bengal spots, main body | `body_main_bengal.png` | `art/exported/characters/patterns/bengal/body_main_bengal.png` | `8662fa198220cfdbe0aa83bdeeef7b855e20124d74f8481467f750d32b67ee8b` |
|
| Bengal spots, main body | `body_main_bengal.png` | `art/exported/characters/patterns/bengal/body_main_bengal.png` | `8662fa198220cfdbe0aa83bdeeef7b855e20124d74f8481467f750d32b67ee8b` |
|
||||||
| Bengal spots, round head | `head_round_bengal.png` | `art/exported/characters/patterns/bengal/head_round_bengal.png` | `c464b042397f5ffe371c48a711ec3d7257adf794d363f3116cb2bddc23e444f8` |
|
| Bengal spots, round head | `head_round_bengal.png` | `art/exported/characters/patterns/bengal/head_round_bengal.png` | `f397ed8d152e3fda8181757a2bbd01925b7b8c2c4362f515d91c7f0fbf3ddfb6` |
|
||||||
| Fox, body and arms | `body_arms_fox.png` | `art/exported/characters/patterns/fox/body_arms_fox.png` | `fd2ab31ede371129ca4806480783d57153318a909d6b87c593b6ff82d03d65eb` |
|
| Fox, body and arms | `body_arms_fox.png` | `art/exported/characters/patterns/fox/body_arms_fox.png` | `9930808718f31d84b415902f1ba55ac2a508bb2ac127300e793d73a8a013022d` |
|
||||||
| Fox, main body | `body_main_fox.png` | `art/exported/characters/patterns/fox/body_main_fox.png` | `d2a975cf042728299de4819a023a95e9c1467671a6886f6c6eaf8b44a5a9ca3a` |
|
| Fox, main body | `body_main_fox.png` | `art/exported/characters/patterns/fox/body_main_fox.png` | `c65e4390173b8c31c9396edd053f940f0f809e47e01d18042cd7babc712dde9d` |
|
||||||
| Fox, pointy head | `head_pointy_fox.png` | `art/exported/characters/patterns/fox/head_pointy_fox.png` | `8e74685ef7a9f61b5ae75c16e86898ea80f3996471e2999862479798ce28aa52` |
|
| Fox, pointy head | `head_pointy_fox.png` | `art/exported/characters/patterns/fox/head_pointy_fox.png` | `71a9d2383e62884dbd3981460fcd985b18805fa907f61ffb16dce08ff9418ddf` |
|
||||||
|
| Fox, round head | `head_round_fox.png` | `art/exported/characters/patterns/fox/head_round_fox.png` | `86dd7af8a2346faf67359ad668a117a74e2408676137d6b0626403cfcf2aba73` |
|
||||||
| Fox tail | `tails_fox_fox.png` | `art/exported/characters/patterns/fox/tails_fox_fox.png` | `72da9673f038e2c3bb8aca19ed99932085fa3b162cab95366901c4e97153dd3e` |
|
| Fox tail | `tails_fox_fox.png` | `art/exported/characters/patterns/fox/tails_fox_fox.png` | `72da9673f038e2c3bb8aca19ed99932085fa3b162cab95366901c4e97153dd3e` |
|
||||||
|
|
||||||
### Tekgator shop icon contribution record
|
### Tekgator shop icon contribution record
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,10 @@ const OPTIONS: Dictionary = {
|
||||||
"res://art/exported/characters/patterns/"
|
"res://art/exported/characters/patterns/"
|
||||||
+ "fox/head_pointy_fox.png"
|
+ "fox/head_pointy_fox.png"
|
||||||
),
|
),
|
||||||
|
"head_round": (
|
||||||
|
"res://art/exported/characters/patterns/"
|
||||||
|
+ "fox/head_round_fox.png"
|
||||||
|
),
|
||||||
"tails_fox": (
|
"tails_fox": (
|
||||||
"res://art/exported/characters/patterns/"
|
"res://art/exported/characters/patterns/"
|
||||||
+ "fox/tails_fox_fox.png"
|
+ "fox/tails_fox_fox.png"
|
||||||
|
|
|
||||||
|
|
@ -389,6 +389,17 @@ func _run() -> void:
|
||||||
assert(service.get_color_id() == &"ocean_teal")
|
assert(service.get_color_id() == &"ocean_teal")
|
||||||
assert(service.get_brush_size() == 4)
|
assert(service.get_brush_size() == 4)
|
||||||
assert(service.get_grid_size() == 128)
|
assert(service.get_grid_size() == 128)
|
||||||
|
var marker_mode_material := mode_button.material as ShaderMaterial
|
||||||
|
assert(marker_mode_material != null)
|
||||||
|
assert(
|
||||||
|
marker_mode_material.shader.resource_path.ends_with(
|
||||||
|
"/ui/art_kit_marker_icon.gdshader"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
assert(
|
||||||
|
marker_mode_material.get_shader_parameter("marker_color")
|
||||||
|
== SurfaceDrawingPalette.get_color(&"ocean_teal")
|
||||||
|
)
|
||||||
|
|
||||||
mode_button.pressed.emit()
|
mode_button.pressed.emit()
|
||||||
assert(service.is_placement_mode())
|
assert(service.is_placement_mode())
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,12 @@ func _validate_starter_water_bodies() -> void:
|
||||||
assert(pond.fish_pool == PondPool)
|
assert(pond.fish_pool == PondPool)
|
||||||
assert(ocean.fish_pool == OceanPool)
|
assert(ocean.fish_pool == OceanPool)
|
||||||
assert(region.get_node_or_null("ShorelineRibbons/Pond") == null)
|
assert(region.get_node_or_null("ShorelineRibbons/Pond") == null)
|
||||||
assert(region.get_node_or_null("ShorelineRibbons/Ocean") != null)
|
var shoreline_geometry := (
|
||||||
|
region.get_node_or_null("ShorelineRibbons/Ocean") as MeshInstance3D
|
||||||
|
)
|
||||||
|
assert(shoreline_geometry != null)
|
||||||
|
assert(not shoreline_geometry.visible)
|
||||||
|
assert(shoreline_geometry.material_override == null)
|
||||||
var pond_material := (
|
var pond_material := (
|
||||||
region.get_node("WaterBodies/Pond/VisualWater") as MeshInstance3D
|
region.get_node("WaterBodies/Pond/VisualWater") as MeshInstance3D
|
||||||
).material_override as ShaderMaterial
|
).material_override as ShaderMaterial
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,14 @@ func _run() -> void:
|
||||||
assert(fox_head_texture != null)
|
assert(fox_head_texture != null)
|
||||||
assert(fox_head_texture.get_width() == 1024)
|
assert(fox_head_texture.get_width() == 1024)
|
||||||
assert(fox_head_texture.get_height() == 1024)
|
assert(fox_head_texture.get_height() == 1024)
|
||||||
|
var fox_round_head_texture := (
|
||||||
|
CharacterCustomizationCatalog.fur_pattern_texture(
|
||||||
|
"fox", "head_round"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
assert(fox_round_head_texture != null)
|
||||||
|
assert(fox_round_head_texture.get_width() == 1024)
|
||||||
|
assert(fox_round_head_texture.get_height() == 1024)
|
||||||
var fox_tail_texture := CharacterCustomizationCatalog.fur_pattern_texture(
|
var fox_tail_texture := CharacterCustomizationCatalog.fur_pattern_texture(
|
||||||
"fox", "tails_fox"
|
"fox", "tails_fox"
|
||||||
)
|
)
|
||||||
|
|
@ -153,6 +161,12 @@ func _run() -> void:
|
||||||
pointy_head_material.get_shader_parameter("pattern_texture")
|
pointy_head_material.get_shader_parameter("pattern_texture")
|
||||||
== fox_head_texture
|
== fox_head_texture
|
||||||
)
|
)
|
||||||
|
fox_snapshot["species"] = "round"
|
||||||
|
PlayerVisualPresenter.apply_appearance(visuals, fox_snapshot)
|
||||||
|
assert(
|
||||||
|
round_head_material.get_shader_parameter("pattern_texture")
|
||||||
|
== fox_round_head_texture
|
||||||
|
)
|
||||||
var fox_tail := skeleton.get_node_or_null("tails_fox") as MeshInstance3D
|
var fox_tail := skeleton.get_node_or_null("tails_fox") as MeshInstance3D
|
||||||
assert(fox_tail != null)
|
assert(fox_tail != null)
|
||||||
var fox_tail_material := fox_tail.material_override as ShaderMaterial
|
var fox_tail_material := fox_tail.material_override as ShaderMaterial
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ func _run() -> void:
|
||||||
))
|
))
|
||||||
_validate_shared_inventory_geometry(player_menu)
|
_validate_shared_inventory_geometry(player_menu)
|
||||||
_validate_inventory_layering(player_menu)
|
_validate_inventory_layering(player_menu)
|
||||||
|
_validate_cooler_notepad_typography(player_menu)
|
||||||
_validate_resolution_matrix()
|
_validate_resolution_matrix()
|
||||||
await _capture_inventory_pages(player_menu)
|
await _capture_inventory_pages(player_menu)
|
||||||
print("Inventory notepad artwork validation: PASS")
|
print("Inventory notepad artwork validation: PASS")
|
||||||
|
|
@ -128,7 +129,7 @@ func _validate_inventory_layering(player_menu: PlayerMenu) -> void:
|
||||||
# The contextual Hotbar uses z=90 while the Player Menu is open.
|
# The contextual Hotbar uses z=90 while the Player Menu is open.
|
||||||
assert(sale_confirmation.z_index > 90)
|
assert(sale_confirmation.z_index > 90)
|
||||||
assert(sale_confirmation.position.is_equal_approx(Vector2(380.0, 265.0)))
|
assert(sale_confirmation.position.is_equal_approx(Vector2(380.0, 265.0)))
|
||||||
assert(sale_confirmation.size.is_equal_approx(Vector2(520.0, 190.0)))
|
assert(sale_confirmation.size.is_equal_approx(Vector2(520.0, 200.0)))
|
||||||
var confirmation_style := sale_confirmation.get_theme_stylebox(
|
var confirmation_style := sale_confirmation.get_theme_stylebox(
|
||||||
"panel"
|
"panel"
|
||||||
) as StyleBoxFlat
|
) as StyleBoxFlat
|
||||||
|
|
@ -140,6 +141,39 @@ func _validate_inventory_layering(player_menu: PlayerMenu) -> void:
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
func _validate_cooler_notepad_typography(player_menu: PlayerMenu) -> void:
|
||||||
|
var sort_choice := player_menu.get_node("%CoolerSortOption") as Control
|
||||||
|
var sort_direction := player_menu.get_node(
|
||||||
|
"%CoolerSortDirection"
|
||||||
|
) as Button
|
||||||
|
var empty_selection := player_menu.get_node(
|
||||||
|
"%CoolerSelectionEmpty"
|
||||||
|
) as Label
|
||||||
|
var favorite := player_menu.get_node("%FavoriteBubble") as Button
|
||||||
|
var sell := player_menu.get_node("%SellBubble") as Button
|
||||||
|
var sell_all := player_menu.get_node("%SellAllBubble") as Button
|
||||||
|
assert(sort_choice != null)
|
||||||
|
assert(sort_direction != null)
|
||||||
|
assert(empty_selection != null)
|
||||||
|
assert(favorite != null and sell != null and sell_all != null)
|
||||||
|
var displayed_value := sort_choice.get_node("%DisplayedValue") as Label
|
||||||
|
assert(displayed_value != null)
|
||||||
|
assert(displayed_value.get_theme_font_size("font_size") == 17)
|
||||||
|
for choice_name: StringName in [
|
||||||
|
&"CatchOrderChoice",
|
||||||
|
&"NameChoice",
|
||||||
|
&"RarityChoice",
|
||||||
|
]:
|
||||||
|
var choice := sort_choice.get_node("%%%s" % choice_name) as Button
|
||||||
|
assert(choice != null)
|
||||||
|
assert(choice.get_theme_font_size("font_size") == 17)
|
||||||
|
assert(sort_direction.get_theme_font_size("font_size") == 17)
|
||||||
|
assert(empty_selection.get_theme_font_size("font_size") == 20)
|
||||||
|
assert(favorite.get_theme_font_size("font_size") == 19)
|
||||||
|
assert(sell.get_theme_font_size("font_size") == 19)
|
||||||
|
assert(sell_all.get_theme_font_size("font_size") == 17)
|
||||||
|
|
||||||
|
|
||||||
func _validate_resolution_matrix() -> void:
|
func _validate_resolution_matrix() -> void:
|
||||||
for target_size: Vector2 in TARGET_SIZES:
|
for target_size: Vector2 in TARGET_SIZES:
|
||||||
var stage_rect: Rect2 = UIReferencePresentationType.get_rect(
|
var stage_rect: Rect2 = UIReferencePresentationType.get_rect(
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,6 @@ const SaltWaterMaterial: ShaderMaterial = preload(
|
||||||
const FreshWaterMaterial: ShaderMaterial = preload(
|
const FreshWaterMaterial: ShaderMaterial = preload(
|
||||||
"res://world/materials/stylized_water_fresh.tres"
|
"res://world/materials/stylized_water_fresh.tres"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func _initialize() -> void:
|
func _initialize() -> void:
|
||||||
call_deferred("_run")
|
call_deferred("_run")
|
||||||
|
|
||||||
|
|
@ -254,10 +252,28 @@ func _validate_environment_presentation() -> void:
|
||||||
var water_shader: Shader = preload(
|
var water_shader: Shader = preload(
|
||||||
"res://world/materials/stylized_water.gdshader"
|
"res://world/materials/stylized_water.gdshader"
|
||||||
)
|
)
|
||||||
|
var sky_shader: Shader = preload(
|
||||||
|
"res://world/environment/netfishing_sky.gdshader"
|
||||||
|
)
|
||||||
|
assert("uniform float fog_horizon_occlusion" in sky_shader.code)
|
||||||
|
assert("fog_horizon_color.rgb" in sky_shader.code)
|
||||||
assert("fog_disabled" in water_shader.code)
|
assert("fog_disabled" in water_shader.code)
|
||||||
|
assert("surface_view_position = view_vertex.xyz" in water_shader.code)
|
||||||
|
assert("surface_view_distance = length(surface_view_position)" in water_shader.code)
|
||||||
|
assert(
|
||||||
|
"max(weather_fog_end, weather_fog_begin + 1.0),\n"
|
||||||
|
+ "\t\tsurface_view_distance"
|
||||||
|
in water_shader.code
|
||||||
|
)
|
||||||
|
assert("weather_fog_near_amount" in water_shader.code)
|
||||||
|
assert("float weather_fog_alpha = mix(" in water_shader.code)
|
||||||
|
assert("ALPHA = clamp(water_alpha, 0.1, weather_fog_alpha)" in water_shader.code)
|
||||||
assert(is_zero_approx(float(
|
assert(is_zero_approx(float(
|
||||||
SaltWaterMaterial.get_shader_parameter("weather_fog_amount")
|
SaltWaterMaterial.get_shader_parameter("weather_fog_amount")
|
||||||
)))
|
)))
|
||||||
|
assert(is_equal_approx(float(
|
||||||
|
SaltWaterMaterial.get_shader_parameter("surface_highlight_night_floor")
|
||||||
|
), WorldTimeVisualController.DEFAULT_SURFACE_HIGHLIGHT_FLOOR))
|
||||||
var day_water_brightness := float(
|
var day_water_brightness := float(
|
||||||
SaltWaterMaterial.get_shader_parameter("environment_brightness")
|
SaltWaterMaterial.get_shader_parameter("environment_brightness")
|
||||||
)
|
)
|
||||||
|
|
@ -288,6 +304,9 @@ func _validate_environment_presentation() -> void:
|
||||||
assert(night_moon_direction.y > 0.85)
|
assert(night_moon_direction.y > 0.85)
|
||||||
assert(night_moon_direction.is_equal_approx(-night_sun_direction))
|
assert(night_moon_direction.is_equal_approx(-night_sun_direction))
|
||||||
assert(runtime_environment.ambient_light_energy < day_ambient_energy)
|
assert(runtime_environment.ambient_light_energy < day_ambient_energy)
|
||||||
|
assert(is_zero_approx(float(
|
||||||
|
runtime_sky_material.get_shader_parameter("fog_horizon_occlusion")
|
||||||
|
)))
|
||||||
var night_water_brightness := float(
|
var night_water_brightness := float(
|
||||||
SaltWaterMaterial.get_shader_parameter("environment_brightness")
|
SaltWaterMaterial.get_shader_parameter("environment_brightness")
|
||||||
)
|
)
|
||||||
|
|
@ -311,6 +330,18 @@ func _validate_environment_presentation() -> void:
|
||||||
assert(float(
|
assert(float(
|
||||||
SaltWaterMaterial.get_shader_parameter("weather_fog_amount")
|
SaltWaterMaterial.get_shader_parameter("weather_fog_amount")
|
||||||
) > 0.99)
|
) > 0.99)
|
||||||
|
assert(is_equal_approx(float(
|
||||||
|
SaltWaterMaterial.get_shader_parameter("weather_fog_near_amount")
|
||||||
|
), WorldTimeVisualController.FOGGY_NIGHT_WATER_NEAR_FOG_AMOUNT))
|
||||||
|
assert(is_equal_approx(float(
|
||||||
|
SaltWaterMaterial.get_shader_parameter("surface_highlight_night_floor")
|
||||||
|
), WorldTimeVisualController.FOGGY_NIGHT_SURFACE_HIGHLIGHT_FLOOR))
|
||||||
|
assert(is_equal_approx(float(
|
||||||
|
runtime_sky_material.get_shader_parameter("fog_horizon_occlusion")
|
||||||
|
), 1.0))
|
||||||
|
assert((
|
||||||
|
runtime_sky_material.get_shader_parameter("fog_horizon_color") as Color
|
||||||
|
).is_equal_approx(WorldTimeVisualController.NIGHT_FOG))
|
||||||
var night_rendered_fog_color := (
|
var night_rendered_fog_color := (
|
||||||
runtime_environment.fog_light_color.srgb_to_linear()
|
runtime_environment.fog_light_color.srgb_to_linear()
|
||||||
)
|
)
|
||||||
|
|
@ -322,7 +353,17 @@ func _validate_environment_presentation() -> void:
|
||||||
var night_water_fog_color := (
|
var night_water_fog_color := (
|
||||||
SaltWaterMaterial.get_shader_parameter("weather_fog_color") as Color
|
SaltWaterMaterial.get_shader_parameter("weather_fog_color") as Color
|
||||||
)
|
)
|
||||||
assert(night_water_fog_color.is_equal_approx(night_rendered_fog_color))
|
var corrected_night_fog_color := night_rendered_fog_color
|
||||||
|
corrected_night_fog_color.r *= (
|
||||||
|
WorldTimeVisualController.FOGGY_DARK_WATER_FOG_CORRECTION.r
|
||||||
|
)
|
||||||
|
corrected_night_fog_color.g *= (
|
||||||
|
WorldTimeVisualController.FOGGY_DARK_WATER_FOG_CORRECTION.g
|
||||||
|
)
|
||||||
|
corrected_night_fog_color.b *= (
|
||||||
|
WorldTimeVisualController.FOGGY_DARK_WATER_FOG_CORRECTION.b
|
||||||
|
)
|
||||||
|
assert(night_water_fog_color.is_equal_approx(corrected_night_fog_color))
|
||||||
var foggy_sky_horizon := (
|
var foggy_sky_horizon := (
|
||||||
runtime_sky_material.get_shader_parameter("sky_horizon_color") as Color
|
runtime_sky_material.get_shader_parameter("sky_horizon_color") as Color
|
||||||
)
|
)
|
||||||
|
|
@ -355,12 +396,35 @@ func _validate_environment_presentation() -> void:
|
||||||
runtime_environment.adjustment_saturation,
|
runtime_environment.adjustment_saturation,
|
||||||
night_adjustment_saturation,
|
night_adjustment_saturation,
|
||||||
))
|
))
|
||||||
|
visuals.apply_time_immediately(8.0)
|
||||||
|
assert(is_equal_approx(float(
|
||||||
|
SaltWaterMaterial.get_shader_parameter("weather_fog_near_amount")
|
||||||
|
), WorldTimeVisualController.FOGGY_NIGHT_WATER_NEAR_FOG_AMOUNT))
|
||||||
|
assert(is_equal_approx(float(
|
||||||
|
runtime_sky_material.get_shader_parameter("fog_horizon_occlusion")
|
||||||
|
), 1.0))
|
||||||
|
visuals.apply_time_immediately(20.0)
|
||||||
|
assert(is_zero_approx(float(
|
||||||
|
SaltWaterMaterial.get_shader_parameter("weather_fog_near_amount")
|
||||||
|
)))
|
||||||
|
assert(is_zero_approx(float(
|
||||||
|
runtime_sky_material.get_shader_parameter("fog_horizon_occlusion")
|
||||||
|
)))
|
||||||
visuals.apply_weather_immediately(WorldWeatherService.Weather.SUNNY)
|
visuals.apply_weather_immediately(WorldWeatherService.Weather.SUNNY)
|
||||||
visuals.apply_time_immediately(20.0)
|
visuals.apply_time_immediately(20.0)
|
||||||
assert(not runtime_environment.fog_enabled)
|
assert(not runtime_environment.fog_enabled)
|
||||||
assert(is_zero_approx(float(
|
assert(is_zero_approx(float(
|
||||||
SaltWaterMaterial.get_shader_parameter("weather_fog_amount")
|
SaltWaterMaterial.get_shader_parameter("weather_fog_amount")
|
||||||
)))
|
)))
|
||||||
|
assert(is_zero_approx(float(
|
||||||
|
SaltWaterMaterial.get_shader_parameter("weather_fog_near_amount")
|
||||||
|
)))
|
||||||
|
assert(is_equal_approx(float(
|
||||||
|
SaltWaterMaterial.get_shader_parameter("surface_highlight_night_floor")
|
||||||
|
), WorldTimeVisualController.DEFAULT_SURFACE_HIGHLIGHT_FLOOR))
|
||||||
|
assert(is_zero_approx(float(
|
||||||
|
runtime_sky_material.get_shader_parameter("fog_horizon_occlusion")
|
||||||
|
)))
|
||||||
var dusk_horizon: Color = runtime_sky_material.get_shader_parameter(
|
var dusk_horizon: Color = runtime_sky_material.get_shader_parameter(
|
||||||
"sky_horizon_color"
|
"sky_horizon_color"
|
||||||
) as Color
|
) as Color
|
||||||
|
|
|
||||||
|
|
@ -330,6 +330,11 @@ func _validate_weather_presentation() -> void:
|
||||||
"weather_fog_amount"
|
"weather_fog_amount"
|
||||||
)
|
)
|
||||||
) > 0.99)
|
) > 0.99)
|
||||||
|
assert(is_zero_approx(float(
|
||||||
|
WorldTimeVisualControllerType.SALT_WATER_MATERIAL.get_shader_parameter(
|
||||||
|
"weather_fog_near_amount"
|
||||||
|
)
|
||||||
|
)))
|
||||||
var water_fog_color := (
|
var water_fog_color := (
|
||||||
WorldTimeVisualControllerType.SALT_WATER_MATERIAL.get_shader_parameter(
|
WorldTimeVisualControllerType.SALT_WATER_MATERIAL.get_shader_parameter(
|
||||||
"weather_fog_color"
|
"weather_fog_color"
|
||||||
|
|
@ -344,6 +349,11 @@ func _validate_weather_presentation() -> void:
|
||||||
rendered_fog_color.a = 1.0
|
rendered_fog_color.a = 1.0
|
||||||
rendered_fog_color = rendered_fog_color.linear_to_srgb()
|
rendered_fog_color = rendered_fog_color.linear_to_srgb()
|
||||||
assert(water_fog_color.is_equal_approx(rendered_fog_color))
|
assert(water_fog_color.is_equal_approx(rendered_fog_color))
|
||||||
|
assert(is_equal_approx(float(
|
||||||
|
WorldTimeVisualControllerType.SALT_WATER_MATERIAL.get_shader_parameter(
|
||||||
|
"surface_highlight_night_floor"
|
||||||
|
)
|
||||||
|
), WorldTimeVisualControllerType.DEFAULT_SURFACE_HIGHLIGHT_FLOOR))
|
||||||
assert(runtime_environment.fog_depth_begin <= 4.01)
|
assert(runtime_environment.fog_depth_begin <= 4.01)
|
||||||
assert(is_equal_approx(runtime_environment.fog_depth_end, 18.0))
|
assert(is_equal_approx(runtime_environment.fog_depth_end, 18.0))
|
||||||
assert(is_equal_approx(runtime_environment.fog_sky_affect, 1.0))
|
assert(is_equal_approx(runtime_environment.fog_sky_affect, 1.0))
|
||||||
|
|
@ -394,6 +404,11 @@ func _validate_weather_presentation() -> void:
|
||||||
"weather_fog_amount"
|
"weather_fog_amount"
|
||||||
)
|
)
|
||||||
) > 0.99)
|
) > 0.99)
|
||||||
|
assert(is_zero_approx(float(
|
||||||
|
WorldTimeVisualControllerType.SALT_WATER_MATERIAL.get_shader_parameter(
|
||||||
|
"weather_fog_near_amount"
|
||||||
|
)
|
||||||
|
)))
|
||||||
var rainy_water_fog_color := (
|
var rainy_water_fog_color := (
|
||||||
WorldTimeVisualControllerType.SALT_WATER_MATERIAL.get_shader_parameter(
|
WorldTimeVisualControllerType.SALT_WATER_MATERIAL.get_shader_parameter(
|
||||||
"weather_fog_color"
|
"weather_fog_color"
|
||||||
|
|
@ -404,6 +419,11 @@ func _validate_weather_presentation() -> void:
|
||||||
WorldTimeVisualControllerType.RAIN_WATER_FOG_COLOR
|
WorldTimeVisualControllerType.RAIN_WATER_FOG_COLOR
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
assert(is_equal_approx(float(
|
||||||
|
WorldTimeVisualControllerType.SALT_WATER_MATERIAL.get_shader_parameter(
|
||||||
|
"surface_highlight_night_floor"
|
||||||
|
)
|
||||||
|
), WorldTimeVisualControllerType.DEFAULT_SURFACE_HIGHLIGHT_FLOOR))
|
||||||
assert(is_equal_approx(runtime_environment.fog_sky_affect, 0.68))
|
assert(is_equal_approx(runtime_environment.fog_sky_affect, 0.68))
|
||||||
assert(
|
assert(
|
||||||
float(runtime_sky_material.get_shader_parameter("cloud_coverage"))
|
float(runtime_sky_material.get_shader_parameter("cloud_coverage"))
|
||||||
|
|
|
||||||
|
|
@ -2391,10 +2391,10 @@ func _update_shell_layout() -> void:
|
||||||
_cooler_sort_direction.custom_minimum_size = (
|
_cooler_sort_direction.custom_minimum_size = (
|
||||||
Vector2(140.0, 31.0) if compact else Vector2(123.0, 38.0)
|
Vector2(140.0, 31.0) if compact else Vector2(123.0, 38.0)
|
||||||
)
|
)
|
||||||
_cooler_sort_option.set_choice_font_size(12 if compact else 15)
|
_cooler_sort_option.set_choice_font_size(14 if compact else 17)
|
||||||
_cooler_sort_direction.add_theme_font_size_override(
|
_cooler_sort_direction.add_theme_font_size_override(
|
||||||
"font_size",
|
"font_size",
|
||||||
12 if compact else 14,
|
14 if compact else 17,
|
||||||
)
|
)
|
||||||
_notepad_wallet_value.position = (
|
_notepad_wallet_value.position = (
|
||||||
Vector2(10.0, 33.0) if compact else Vector2(18.0, 61.0)
|
Vector2(10.0, 33.0) if compact else Vector2(18.0, 61.0)
|
||||||
|
|
@ -2472,13 +2472,13 @@ func _update_shell_layout() -> void:
|
||||||
Vector2(96.0, 38.0) if compact else Vector2(122.0, 44.0)
|
Vector2(96.0, 38.0) if compact else Vector2(122.0, 44.0)
|
||||||
)
|
)
|
||||||
_favorite_bubble.add_theme_font_size_override(
|
_favorite_bubble.add_theme_font_size_override(
|
||||||
"font_size", 11 if compact else 17,
|
"font_size", 13 if compact else 19,
|
||||||
)
|
)
|
||||||
_sell_bubble.add_theme_font_size_override(
|
_sell_bubble.add_theme_font_size_override(
|
||||||
"font_size", 11 if compact else 17,
|
"font_size", 13 if compact else 19,
|
||||||
)
|
)
|
||||||
_sell_all_bubble.add_theme_font_size_override(
|
_sell_all_bubble.add_theme_font_size_override(
|
||||||
"font_size", 11 if compact else 15,
|
"font_size", 12 if compact else 17,
|
||||||
)
|
)
|
||||||
_update_sort_direction_text()
|
_update_sort_direction_text()
|
||||||
_bag_page.size = reference_size
|
_bag_page.size = reference_size
|
||||||
|
|
@ -2611,8 +2611,10 @@ func _layout_cooler_selection_text(compact: bool) -> void:
|
||||||
_cooler_combined_offer_value.get_amount_label().add_theme_font_size_override(
|
_cooler_combined_offer_value.get_amount_label().add_theme_font_size_override(
|
||||||
"font_size", 10 if compact else 14
|
"font_size", 10 if compact else 14
|
||||||
)
|
)
|
||||||
|
_cooler_selection_empty.add_theme_font_size_override(
|
||||||
|
"font_size", 14 if compact else 20
|
||||||
|
)
|
||||||
for word_label: Label in [
|
for word_label: Label in [
|
||||||
_cooler_selection_empty,
|
|
||||||
_cooler_selected_count_label,
|
_cooler_selected_count_label,
|
||||||
_cooler_combined_offer_label,
|
_cooler_combined_offer_label,
|
||||||
]:
|
]:
|
||||||
|
|
|
||||||
|
|
@ -391,7 +391,7 @@ grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
theme_override_colors/font_color = Color(0.2, 0.18, 0.15, 0.86)
|
theme_override_colors/font_color = Color(0.2, 0.18, 0.15, 0.86)
|
||||||
theme_override_font_sizes/font_size = 18
|
theme_override_font_sizes/font_size = 20
|
||||||
text = "no fish selected"
|
text = "no fish selected"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@ const UtilityPageStyleType = preload("res://ui/utility_page_style.gd")
|
||||||
const MARKER_MODE_ICON: Texture2D = preload(
|
const MARKER_MODE_ICON: Texture2D = preload(
|
||||||
"res://items/icons/art/art_kit_marker.png"
|
"res://items/icons/art/art_kit_marker.png"
|
||||||
)
|
)
|
||||||
|
const MARKER_MODE_SHADER: Shader = preload(
|
||||||
|
"res://ui/art_kit_marker_icon.gdshader"
|
||||||
|
)
|
||||||
const GRID_MODE_ICON: Texture2D = preload(
|
const GRID_MODE_ICON: Texture2D = preload(
|
||||||
"res://items/icons/art/art_kit_grid_light.png"
|
"res://items/icons/art/art_kit_grid_light.png"
|
||||||
)
|
)
|
||||||
|
|
@ -28,6 +31,7 @@ var _service: NetworkSurfaceDrawingService
|
||||||
var _unlocks: PlayerArtUnlocks
|
var _unlocks: PlayerArtUnlocks
|
||||||
var _color_buttons: Dictionary[StringName, Button] = {}
|
var _color_buttons: Dictionary[StringName, Button] = {}
|
||||||
var _dock_right: bool = true
|
var _dock_right: bool = true
|
||||||
|
var _marker_mode_material: ShaderMaterial
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
|
@ -44,6 +48,13 @@ func _ready() -> void:
|
||||||
_mode_button.custom_minimum_size = Vector2(48, 48)
|
_mode_button.custom_minimum_size = Vector2(48, 48)
|
||||||
_make_button_round(_mode_button, 24)
|
_make_button_round(_mode_button, 24)
|
||||||
_enlarge_action_icon(_mode_button)
|
_enlarge_action_icon(_mode_button)
|
||||||
|
_marker_mode_material = ShaderMaterial.new()
|
||||||
|
_marker_mode_material.shader = MARKER_MODE_SHADER
|
||||||
|
_marker_mode_material.set_shader_parameter(
|
||||||
|
"marker_color",
|
||||||
|
SurfaceDrawingPalette.get_color(SurfaceDrawingPalette.DEFAULT_COLOR_ID),
|
||||||
|
)
|
||||||
|
_mode_button.material = _marker_mode_material
|
||||||
for button: Button in _action_buttons():
|
for button: Button in _action_buttons():
|
||||||
_enlarge_action_icon(button)
|
_enlarge_action_icon(button)
|
||||||
_mode_button.pressed.connect(_toggle_mode)
|
_mode_button.pressed.connect(_toggle_mode)
|
||||||
|
|
@ -290,7 +301,7 @@ func _on_service_state_changed(
|
||||||
is_active: bool,
|
is_active: bool,
|
||||||
mode_name: String,
|
mode_name: String,
|
||||||
_color_name: String,
|
_color_name: String,
|
||||||
_color_value: Color,
|
color_value: Color,
|
||||||
brush_size: int,
|
brush_size: int,
|
||||||
grid_size: int,
|
grid_size: int,
|
||||||
_status: String,
|
_status: String,
|
||||||
|
|
@ -301,6 +312,7 @@ func _on_service_state_changed(
|
||||||
_mode_button.icon = (
|
_mode_button.icon = (
|
||||||
GRID_MODE_ICON if mode_name == "place grid" else MARKER_MODE_ICON
|
GRID_MODE_ICON if mode_name == "place grid" else MARKER_MODE_ICON
|
||||||
)
|
)
|
||||||
|
_marker_mode_material.set_shader_parameter("marker_color", color_value)
|
||||||
_mode_button.accessibility_name = (
|
_mode_button.accessibility_name = (
|
||||||
"switch to marker mode"
|
"switch to marker mode"
|
||||||
if mode_name == "place grid"
|
if mode_name == "place grid"
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ uniform vec4 sky_horizon_color : source_color = vec4(0.663, 0.843, 0.847, 1.0);
|
||||||
uniform vec4 ground_bottom_color : source_color = vec4(0.157, 0.361, 0.439, 1.0);
|
uniform vec4 ground_bottom_color : source_color = vec4(0.157, 0.361, 0.439, 1.0);
|
||||||
uniform vec4 ground_horizon_color : source_color = vec4(0.549, 0.749, 0.765, 1.0);
|
uniform vec4 ground_horizon_color : source_color = vec4(0.549, 0.749, 0.765, 1.0);
|
||||||
uniform float horizon_blend_width : hint_range(0.005, 0.15, 0.005) = 0.01;
|
uniform float horizon_blend_width : hint_range(0.005, 0.15, 0.005) = 0.01;
|
||||||
|
uniform vec4 fog_horizon_color : source_color = vec4(0.13, 0.21, 0.32, 1.0);
|
||||||
|
uniform float fog_horizon_occlusion : hint_range(0.0, 1.0) = 0.0;
|
||||||
|
|
||||||
uniform vec3 sun_direction = vec3(0.0, 1.0, 0.0);
|
uniform vec3 sun_direction = vec3(0.0, 1.0, 0.0);
|
||||||
uniform vec4 sun_color : source_color = vec4(1.0, 0.86, 0.46, 1.0);
|
uniform vec4 sun_color : source_color = vec4(1.0, 0.86, 0.46, 1.0);
|
||||||
|
|
@ -86,6 +88,14 @@ void sky() {
|
||||||
base_color, moon_color.rgb, moon_disc * moon_visible_strength
|
base_color, moon_color.rgb, moon_disc * moon_visible_strength
|
||||||
);
|
);
|
||||||
base_color = apply_weather_clouds(base_color, view_direction);
|
base_color = apply_weather_clouds(base_color, view_direction);
|
||||||
|
// Compatibility fog does not fully erase the color split between a custom
|
||||||
|
// sky's upper and lower hemispheres. Dense low-light fog supplies one
|
||||||
|
// uniform sky color here so that split cannot masquerade as an ocean edge.
|
||||||
|
base_color = mix(
|
||||||
|
base_color,
|
||||||
|
fog_horizon_color.rgb,
|
||||||
|
fog_horizon_occlusion
|
||||||
|
);
|
||||||
|
|
||||||
COLOR = base_color;
|
COLOR = base_color;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ shader_parameter/sky_horizon_color = Color(0.663, 0.843, 0.847, 1)
|
||||||
shader_parameter/ground_bottom_color = Color(0.157, 0.361, 0.439, 1)
|
shader_parameter/ground_bottom_color = Color(0.157, 0.361, 0.439, 1)
|
||||||
shader_parameter/ground_horizon_color = Color(0.549, 0.749, 0.765, 1)
|
shader_parameter/ground_horizon_color = Color(0.549, 0.749, 0.765, 1)
|
||||||
shader_parameter/horizon_blend_width = 0.01
|
shader_parameter/horizon_blend_width = 0.01
|
||||||
|
shader_parameter/fog_horizon_color = Color(0.13, 0.21, 0.32, 1)
|
||||||
|
shader_parameter/fog_horizon_occlusion = 0.0
|
||||||
shader_parameter/sun_direction = Vector3(0, 1, 0)
|
shader_parameter/sun_direction = Vector3(0, 1, 0)
|
||||||
shader_parameter/sun_color = Color(1, 0.86, 0.46, 1)
|
shader_parameter/sun_color = Color(1, 0.86, 0.46, 1)
|
||||||
shader_parameter/sun_visibility = 1.0
|
shader_parameter/sun_visibility = 1.0
|
||||||
|
|
|
||||||
|
|
@ -56,12 +56,14 @@ uniform vec4 environment_tint : source_color = vec4(1.0);
|
||||||
uniform float environment_brightness : hint_range(0.1, 1.2, 0.01) = 1.0;
|
uniform float environment_brightness : hint_range(0.1, 1.2, 0.01) = 1.0;
|
||||||
uniform vec4 weather_fog_color : source_color = vec4(0.025, 0.038, 0.045, 1.0);
|
uniform vec4 weather_fog_color : source_color = vec4(0.025, 0.038, 0.045, 1.0);
|
||||||
uniform float weather_fog_amount : hint_range(0.0, 1.0, 0.01) = 0.0;
|
uniform float weather_fog_amount : hint_range(0.0, 1.0, 0.01) = 0.0;
|
||||||
|
uniform float weather_fog_near_amount : hint_range(0.0, 1.0, 0.01) = 0.0;
|
||||||
uniform float weather_fog_begin : hint_range(0.0, 500.0, 0.5) = 20.0;
|
uniform float weather_fog_begin : hint_range(0.0, 500.0, 0.5) = 20.0;
|
||||||
uniform float weather_fog_end : hint_range(1.0, 1000.0, 0.5) = 95.0;
|
uniform float weather_fog_end : hint_range(1.0, 1000.0, 0.5) = 95.0;
|
||||||
uniform float weather_fog_curve : hint_range(0.1, 4.0, 0.01) = 1.4;
|
uniform float weather_fog_curve : hint_range(0.1, 4.0, 0.01) = 1.4;
|
||||||
|
|
||||||
varying vec3 world_position;
|
varying vec3 world_position;
|
||||||
varying float surface_view_depth;
|
varying float surface_view_depth;
|
||||||
|
varying vec3 surface_view_position;
|
||||||
|
|
||||||
|
|
||||||
float hash_21(vec2 point) {
|
float hash_21(vec2 point) {
|
||||||
|
|
@ -208,6 +210,12 @@ void vertex() {
|
||||||
vec4 view_vertex = VIEW_MATRIX * world_vertex;
|
vec4 view_vertex = VIEW_MATRIX * world_vertex;
|
||||||
world_position = world_vertex.xyz;
|
world_position = world_vertex.xyz;
|
||||||
surface_view_depth = -view_vertex.z;
|
surface_view_depth = -view_vertex.z;
|
||||||
|
// Godot's depth fog measures radial view-space distance. Keep the existing
|
||||||
|
// forward depth for distant-water presentation, but pass the linear view
|
||||||
|
// position so weather fog can derive the same per-fragment radial metric as
|
||||||
|
// opaque world geometry. Calculating length here would interpolate four
|
||||||
|
// corner distances across the oversized ocean plane and over-fog its center.
|
||||||
|
surface_view_position = view_vertex.xyz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -549,25 +557,35 @@ void fragment() {
|
||||||
visible_highlight_color,
|
visible_highlight_color,
|
||||||
clamp(visible_highlight, 0.0, 1.0)
|
clamp(visible_highlight, 0.0, 1.0)
|
||||||
);
|
);
|
||||||
|
float surface_view_distance = length(surface_view_position);
|
||||||
float weather_fog_distance = smoothstep(
|
float weather_fog_distance = smoothstep(
|
||||||
weather_fog_begin,
|
weather_fog_begin,
|
||||||
max(weather_fog_end, weather_fog_begin + 1.0),
|
max(weather_fog_end, weather_fog_begin + 1.0),
|
||||||
surface_view_depth
|
surface_view_distance
|
||||||
);
|
);
|
||||||
weather_fog_distance = pow(
|
weather_fog_distance = pow(
|
||||||
clamp(weather_fog_distance, 0.0, 1.0),
|
clamp(weather_fog_distance, 0.0, 1.0),
|
||||||
weather_fog_curve
|
weather_fog_curve
|
||||||
);
|
);
|
||||||
float weather_fog_mix = weather_fog_amount * weather_fog_distance;
|
float distance_fog_mix = weather_fog_amount * weather_fog_distance;
|
||||||
|
float weather_fog_mix = 1.0 - (
|
||||||
|
(1.0 - weather_fog_near_amount)
|
||||||
|
* (1.0 - distance_fog_mix)
|
||||||
|
);
|
||||||
water_color = mix(
|
water_color = mix(
|
||||||
water_color,
|
water_color,
|
||||||
weather_fog_color.rgb,
|
weather_fog_color.rgb,
|
||||||
weather_fog_mix
|
weather_fog_mix
|
||||||
);
|
);
|
||||||
water_alpha = mix(water_alpha, 0.96, weather_fog_mix);
|
float weather_fog_alpha = mix(
|
||||||
|
0.96,
|
||||||
|
1.0,
|
||||||
|
weather_fog_near_amount
|
||||||
|
);
|
||||||
|
water_alpha = mix(water_alpha, weather_fog_alpha, weather_fog_mix);
|
||||||
|
|
||||||
ALBEDO = water_color;
|
ALBEDO = water_color;
|
||||||
ALPHA = clamp(water_alpha, 0.1, 0.96);
|
ALPHA = clamp(water_alpha, 0.1, weather_fog_alpha);
|
||||||
METALLIC = 0.0;
|
METALLIC = 0.0;
|
||||||
SPECULAR = 0.0;
|
SPECULAR = 0.0;
|
||||||
ROUGHNESS = 1.0;
|
ROUGHNESS = 1.0;
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,11 @@ const FOG_DAYLIGHT_FOG_LIGHT_BRIGHTNESS: float = 0.42
|
||||||
const FOG_DAYLIGHT_WATER_BRIGHTNESS: float = 0.42
|
const FOG_DAYLIGHT_WATER_BRIGHTNESS: float = 0.42
|
||||||
const FOG_DAYLIGHT_POST_BRIGHTNESS: float = 0.50
|
const FOG_DAYLIGHT_POST_BRIGHTNESS: float = 0.50
|
||||||
const RAIN_DAYLIGHT_POST_BRIGHTNESS: float = 0.52
|
const RAIN_DAYLIGHT_POST_BRIGHTNESS: float = 0.52
|
||||||
|
const DEFAULT_SURFACE_HIGHLIGHT_FLOOR: float = 0.72
|
||||||
|
const FOGGY_NIGHT_SURFACE_HIGHLIGHT_FLOOR: float = 0.25
|
||||||
|
const FOGGY_NIGHT_WATER_NEAR_FOG_AMOUNT: float = 1.0
|
||||||
|
const FOGGY_DARK_WATER_FOG_CORRECTION := Color(1.15, 1.025, 1.0, 1.0)
|
||||||
|
const FOGGY_BRIGHT_WATER_FOG_CORRECTION := Color(0.99, 1.005, 1.01, 1.0)
|
||||||
const RAIN_WATER_FOG_COLOR := Color(0.025, 0.038, 0.045)
|
const RAIN_WATER_FOG_COLOR := Color(0.025, 0.038, 0.045)
|
||||||
const SALT_WATER_MATERIAL: ShaderMaterial = preload(
|
const SALT_WATER_MATERIAL: ShaderMaterial = preload(
|
||||||
"res://world/materials/stylized_water.tres"
|
"res://world/materials/stylized_water.tres"
|
||||||
|
|
@ -259,6 +264,7 @@ func _apply_time(time_hours: float) -> void:
|
||||||
rain_fog_amount + foggy_fog_amount,
|
rain_fog_amount + foggy_fog_amount,
|
||||||
1.0,
|
1.0,
|
||||||
)
|
)
|
||||||
|
var foggy_horizon_occlusion := _foggy_horizon_occlusion_amount(hour)
|
||||||
_environment.fog_enabled = weather_fog_amount > 0.001
|
_environment.fog_enabled = weather_fog_amount > 0.001
|
||||||
var fog_scene_brightness: float = lerpf(
|
var fog_scene_brightness: float = lerpf(
|
||||||
1.0,
|
1.0,
|
||||||
|
|
@ -280,6 +286,11 @@ func _apply_time(time_hours: float) -> void:
|
||||||
"ground_horizon_color",
|
"ground_horizon_color",
|
||||||
ground_horizon,
|
ground_horizon,
|
||||||
)
|
)
|
||||||
|
_sky_material.set_shader_parameter("fog_horizon_color", fog_color)
|
||||||
|
_sky_material.set_shader_parameter(
|
||||||
|
"fog_horizon_occlusion",
|
||||||
|
foggy_fog_amount * foggy_horizon_occlusion,
|
||||||
|
)
|
||||||
_apply_sky_clouds(daylight, warmth)
|
_apply_sky_clouds(daylight, warmth)
|
||||||
_environment.background_energy_multiplier = (
|
_environment.background_energy_multiplier = (
|
||||||
lerpf(0.52, 0.85, daylight)
|
lerpf(0.52, 0.85, daylight)
|
||||||
|
|
@ -323,6 +334,7 @@ func _apply_time(time_hours: float) -> void:
|
||||||
warmth,
|
warmth,
|
||||||
rain_fog_amount,
|
rain_fog_amount,
|
||||||
foggy_fog_amount,
|
foggy_fog_amount,
|
||||||
|
foggy_horizon_occlusion,
|
||||||
_fog_render_color(fog_color, fog_light_energy),
|
_fog_render_color(fog_color, fog_light_energy),
|
||||||
)
|
)
|
||||||
_environment.adjustment_brightness = (
|
_environment.adjustment_brightness = (
|
||||||
|
|
@ -381,6 +393,7 @@ func _apply_water_environment(
|
||||||
warmth: float,
|
warmth: float,
|
||||||
rain_fog_amount: float,
|
rain_fog_amount: float,
|
||||||
foggy_fog_amount: float,
|
foggy_fog_amount: float,
|
||||||
|
foggy_horizon_occlusion: float,
|
||||||
fog_render_color: Color,
|
fog_render_color: Color,
|
||||||
) -> void:
|
) -> void:
|
||||||
var water_tint := _blended_color(
|
var water_tint := _blended_color(
|
||||||
|
|
@ -412,6 +425,44 @@ func _apply_water_environment(
|
||||||
fog_render_color,
|
fog_render_color,
|
||||||
foggy_color_weight,
|
foggy_color_weight,
|
||||||
)
|
)
|
||||||
|
var fog_correction_amount := (
|
||||||
|
foggy_fog_amount * foggy_horizon_occlusion
|
||||||
|
)
|
||||||
|
var bright_fog_amount := maxf(daylight, warmth)
|
||||||
|
var fog_color_correction := FOGGY_DARK_WATER_FOG_CORRECTION.lerp(
|
||||||
|
FOGGY_BRIGHT_WATER_FOG_CORRECTION,
|
||||||
|
bright_fog_amount,
|
||||||
|
)
|
||||||
|
water_fog_color.r *= lerpf(
|
||||||
|
1.0,
|
||||||
|
fog_color_correction.r,
|
||||||
|
fog_correction_amount,
|
||||||
|
)
|
||||||
|
water_fog_color.g *= lerpf(
|
||||||
|
1.0,
|
||||||
|
fog_color_correction.g,
|
||||||
|
fog_correction_amount,
|
||||||
|
)
|
||||||
|
water_fog_color.b *= lerpf(
|
||||||
|
1.0,
|
||||||
|
fog_color_correction.b,
|
||||||
|
fog_correction_amount,
|
||||||
|
)
|
||||||
|
var foggy_surface_highlight_floor := lerpf(
|
||||||
|
FOGGY_NIGHT_SURFACE_HIGHLIGHT_FLOOR,
|
||||||
|
DEFAULT_SURFACE_HIGHLIGHT_FLOOR,
|
||||||
|
daylight,
|
||||||
|
)
|
||||||
|
var surface_highlight_floor := lerpf(
|
||||||
|
DEFAULT_SURFACE_HIGHLIGHT_FLOOR,
|
||||||
|
foggy_surface_highlight_floor,
|
||||||
|
foggy_fog_amount,
|
||||||
|
)
|
||||||
|
var water_near_fog_amount := (
|
||||||
|
FOGGY_NIGHT_WATER_NEAR_FOG_AMOUNT
|
||||||
|
* foggy_fog_amount
|
||||||
|
* foggy_horizon_occlusion
|
||||||
|
)
|
||||||
for material: ShaderMaterial in [
|
for material: ShaderMaterial in [
|
||||||
SALT_WATER_MATERIAL,
|
SALT_WATER_MATERIAL,
|
||||||
FRESH_WATER_MATERIAL,
|
FRESH_WATER_MATERIAL,
|
||||||
|
|
@ -422,10 +473,18 @@ func _apply_water_environment(
|
||||||
water_brightness,
|
water_brightness,
|
||||||
)
|
)
|
||||||
material.set_shader_parameter("weather_fog_color", water_fog_color)
|
material.set_shader_parameter("weather_fog_color", water_fog_color)
|
||||||
|
material.set_shader_parameter(
|
||||||
|
"surface_highlight_night_floor",
|
||||||
|
surface_highlight_floor,
|
||||||
|
)
|
||||||
material.set_shader_parameter(
|
material.set_shader_parameter(
|
||||||
"weather_fog_amount",
|
"weather_fog_amount",
|
||||||
weather_fog_amount,
|
weather_fog_amount,
|
||||||
)
|
)
|
||||||
|
material.set_shader_parameter(
|
||||||
|
"weather_fog_near_amount",
|
||||||
|
water_near_fog_amount,
|
||||||
|
)
|
||||||
material.set_shader_parameter(
|
material.set_shader_parameter(
|
||||||
"weather_fog_begin",
|
"weather_fog_begin",
|
||||||
_weather_value(42.0, 32.0, 20.0, 3.0),
|
_weather_value(42.0, 32.0, 20.0, 3.0),
|
||||||
|
|
@ -449,6 +508,28 @@ func _fog_render_color(fog_color: Color, fog_light_energy: float) -> Color:
|
||||||
return linear_fog_color.linear_to_srgb()
|
return linear_fog_color.linear_to_srgb()
|
||||||
|
|
||||||
|
|
||||||
|
func _foggy_horizon_occlusion_amount(hour: float) -> float:
|
||||||
|
# Day and dusk already blend cleanly. During night and most of dawn, make
|
||||||
|
# the manually fogged transparent water fully occluding so the dark scene
|
||||||
|
# below it cannot reintroduce a horizon band. Brief edge fades avoid a pop
|
||||||
|
# where the dawn/night phases meet their neighboring phases.
|
||||||
|
if hour >= WorldTimeService.DUSK_END_HOUR - 0.1:
|
||||||
|
return smoothstep(
|
||||||
|
WorldTimeService.DUSK_END_HOUR - 0.1,
|
||||||
|
WorldTimeService.DUSK_END_HOUR,
|
||||||
|
hour,
|
||||||
|
)
|
||||||
|
if hour < WorldTimeService.DAWN_START_HOUR:
|
||||||
|
return 1.0
|
||||||
|
if hour < WorldTimeService.DAWN_END_HOUR:
|
||||||
|
return 1.0 - smoothstep(
|
||||||
|
WorldTimeService.DAWN_END_HOUR - 0.1,
|
||||||
|
WorldTimeService.DAWN_END_HOUR,
|
||||||
|
hour,
|
||||||
|
)
|
||||||
|
return 0.0
|
||||||
|
|
||||||
|
|
||||||
func _apply_sky_clouds(daylight: float, warmth: float) -> void:
|
func _apply_sky_clouds(daylight: float, warmth: float) -> void:
|
||||||
var cloud_light := _blended_color(
|
var cloud_light := _blended_color(
|
||||||
NIGHT_CLOUD_LIGHT,
|
NIGHT_CLOUD_LIGHT,
|
||||||
|
|
|
||||||