test other scenes and fix

This commit is contained in:
2026-04-02 15:39:06 +02:00
parent 8883699886
commit 9e261d8d37
33 changed files with 515 additions and 62 deletions

View File

@@ -24,7 +24,6 @@ func _ready() -> void:
current_time = start_time
update_time(current_time)
func _process(delta: float) -> void:
if paused or environment_config.day_duration <= 0.0:

View File

@@ -67,14 +67,14 @@ func _ready() -> void:
func ApplyWindNoiseToMaterials():
var noise_tex = preload("res://core/daynight/noise.tres")
for node in get_tree().get_nodes_in_group("wind_materials"):
for node in get_tree().get_nodes_in_group("wind_node"):
if node is GeometryInstance3D:
node.material_override.set_shader_parameter("wind_noise", noise_tex)
func ApplyWeatherShaderToMaterials():
var weather_shader = preload("res://core/daynight/weather_overlay.tres")
for node in get_tree().get_nodes_in_group("weather_materials"):
for node in get_tree().get_nodes_in_group("weather_node"):
if node is GeometryInstance3D:
node.material_overlay = weather_shader
else:
@@ -83,25 +83,25 @@ func ApplyWeatherShaderToMaterials():
child.material_overlay = weather_shader
func select_day_time(normalized_time: float) -> void:
# 0.0→0.25 = alba: day_time 1.0→2.0 (night colors → morning colors)
# 0.25→0.5 = giorno: day_time 2.0→2.0 (stays morning/afternoon)
# 0.5→0.75 = tramonto: day_time 2.0→3.0 (afternoon colors → night colors)
# 0.75→1.0 = notte: day_time 3.0→3.0 (stays night)
# At wrap 1.0→0.0: day_time stays 3.0, then fades back via alba
# 0.0→0.25 = sunrise: day_time 1.0→2.0 (night colors → morning colors)
# 0.25→0.5 = day: day_time 2.0→2.0 (stays morning/afternoon)
# 0.5→0.75 = sunset: day_time 2.0→3.0 (afternoon colors → night colors)
# 0.75→1.0 = night: day_time 3.0→3.0 (stays night)
# At wrap 1.0→0.0: day_time stays 3.0, then fades back via sunrise
if normalized_time < 0.25:
# Alba: notte → mattina
#Sunrise: night → morning
day_time = 3.0 - (normalized_time / 0.25) * 2.0 # 3.0 → 1.0
elif normalized_time < 0.5:
# Giorno pieno
#Broad daylight
var t: float = (normalized_time - 0.25) / 0.25
day_time = 1.0 + t # 1.0 → 2.0
elif normalized_time < 0.75:
# Tramonto: pomeriggio → notte
#Sunset: afternoon → night
var t: float = (normalized_time - 0.5) / 0.25
day_time = 2.0 + t # 2.0 → 3.0
else:
# Notte piena
#Night
day_time = 3.0
if weather_controller:

View File

@@ -10,6 +10,7 @@ global uniform float global_snow_accumulation_speed;
global uniform float global_snow_melt_time;
global uniform float global_snow_melt_speed;
global uniform vec4 global_snow_color;
global uniform float global_rain_intensity;
uniform sampler2D wind_noise : filter_linear_mipmap;
uniform bool billboard_enabled = true;
@@ -27,6 +28,7 @@ uniform float highlight_intensity : hint_range(0.0, 1.0) = 0.3;
uniform float light_steps : hint_range(1.0, 10.0) = 4.0;
uniform float random_mix : hint_range(0.0, 1.0) = 0.3;
uniform float cast_shadow_strength : hint_range(0.0, 1.0) = 0.6;
uniform float wetness_darkening : hint_range(0.0, 0.5) = 0.25;
varying vec3 v_final_color;
varying float v_shade_factor;
@@ -102,14 +104,19 @@ void fragment() {
vec3 shaded_snow = mix(dark_snow, global_snow_color.rgb, v_shade_factor);
vec3 final_albedo = mix(v_final_color, shaded_snow, snow_mask);
// Rain wetness: darken and make shinier
float rain_int = clamp(global_rain_intensity, 0.0, 1.0);
final_albedo *= mix(1.0, 1.0 - wetness_darkening, rain_int);
float final_roughness = mix(0.02, 0.005, rain_int);
ALBEDO = final_albedo;
ALPHA = tex.r * opacity;
ALPHA_SCISSOR_THRESHOLD = 0.5;
ROUGHNESS = 0.02;
ROUGHNESS = final_roughness;
}
void light() {
float shadow_factor = mix(1.0 - cast_shadow_strength, 1.0, ATTENUATION);
float cutoff_mask = smoothstep(0.0, 0.05, ATTENUATION);
DIFFUSE_LIGHT += (shadow_factor * LIGHT_COLOR) * cutoff_mask;
}
}

View File

@@ -24,14 +24,10 @@ uniform vec4 shadow_color : source_color = vec4(0.4, 0.4, 0.6, 1.0);
uniform float shadow_offset : hint_range(-1.0, 1.0) = 0.0;
uniform float cast_shadow_strength : hint_range(0.0, 1.0) = 0.6;
// ---> NUOVO SISTEMA: GHIBLI DIRECTIONAL GLINT <---
group_uniforms Ghibli_Directional_Glint;
uniform bool use_ghibli_glint = true;
// Colore del bagliore (consigliato: panna caldo o albicocca desaturato)
uniform vec4 glint_color : source_color = vec4(1.0, 0.95, 0.85, 1.0);
// Quanta luce extra vogliamo (es: 1.0 = colora, >1.0 = fa brillare, ideale per Bloom)
uniform float glint_intensity : hint_range(0.0, 10.0) = 1.0;
// DEFINIZIONE DELL'ANGOLO: Più è alto, più la fascia di luce è stretta e netta (HArd Step)
uniform float glint_sharpness : hint_range(1.0, 128.0) = 32.0;
group_uniforms Emission_Settings;
@@ -60,13 +56,12 @@ void fragment() {
}
void light() {
// GESTIONE ATTENUAZIONE E OMBRE (Anti-frittura con dither)
float shadow_factor = mix(1.0 - cast_shadow_strength, 1.0, ATTENUATION);
float cutoff_mask = smoothstep(0.0, 0.1, ATTENUATION);
float n_dot_l = dot(NORMAL, LIGHT);
// Anti-frittura dither
//dither
float dither = fract(sin(dot(FRAGCOORD.xy, vec2(12.9898, 78.233))) * 43758.5453);
float intensity = (clamp(n_dot_l, 0.0, 1.0) * shadow_factor) + (dither - 0.5) * 0.02;
@@ -76,28 +71,16 @@ void light() {
float soft_lerp = smoothstep(0.5 - step_softness, 0.5 + step_softness, fract_step);
float stepped_intensity = (lower_step + soft_lerp) / light_steps;
// Colori finali Toon
//Toon colors
vec3 light_color_final = mix(shadow_color.rgb, vec3(1.1), clamp(stepped_intensity, 0.0, 1.0));
DIFFUSE_LIGHT += (light_color_final * LIGHT_COLOR) * cutoff_mask;
// ---> GHIBLI DIRECTIONAL GLINT (Il segreto dei tetti) <---
// Sfrutta solo la direzione del sole e la normale dell'oggetto, NON la telecamera.
if (use_ghibli_glint) {
// Calcoliamo un'area di "massima luce" molto aggressiva rivolta perpendicolarmente al sole
// Più 'glint_sharpness' è alto, più la fascia si stringe e diventa selettiva
float glint_raw = pow(max(0.0, n_dot_l), glint_sharpness);
// Toon-ifichiamo l'area con un taglio netto ma pulito
float glint_mask = smoothstep(0.5 - step_softness*0.5, 0.5 + step_softness*0.5, glint_raw);
// Mascheriamo per evitare che appaia nelle ombre proiettate dagli alberi (ATTENUATION)
// e puliamo i bordi laterali (cutoff a 0.0)
glint_mask *= smoothstep(0.0, 0.1, n_dot_l);
// Calcoliamo la luce extra finale
vec3 extra_sun_glint = glint_mask * glint_color.rgb * LIGHT_COLOR * glint_intensity * ATTENUATION;
// Aggiungiamo questa "botta" di luce extra direzionale
DIFFUSE_LIGHT += extra_sun_glint;
}
}

View File

@@ -0,0 +1,61 @@
shader_type spatial;
render_mode blend_mix, depth_draw_never, cull_disabled;
// Snow globals
global uniform float global_snow_start_time;
global uniform float global_snow_accumulation_speed;
global uniform float global_snow_melt_time;
global uniform float global_snow_melt_speed;
global uniform vec4 global_snow_color;
// Rain globals
global uniform float global_rain_intensity;
// Snow parameters
uniform float snow_edge_softness : hint_range(0.01, 0.5) = 0.15;
uniform float snow_color_variation : hint_range(0.0, 0.15) = 0.05;
// Rain wetness parameters
uniform float wetness_darkening : hint_range(0.0, 0.5) = 0.25;
uniform float wet_roughness : hint_range(0.0, 0.3) = 0.05;
void fragment() {
// Snow accumulation
float snow_amount = 0.0;
if (global_snow_start_time >= 0.0) {
snow_amount = clamp((TIME - global_snow_start_time) * global_snow_accumulation_speed, 0.0, 1.0);
}
if (global_snow_melt_time >= 0.0) {
float melt = clamp((TIME - global_snow_melt_time) * global_snow_melt_speed, 0.0, 1.0);
snow_amount *= (1.0 - melt);
}
// UV-based snow mask: accumulates from the top of the quad
float top_mask = 1.0 - UV.y;
float snow_mask = smoothstep(1.0 - snow_amount, 1.0 - snow_amount + snow_edge_softness, top_mask);
snow_mask *= step(0.01, snow_amount);
// Snow color with slight variation
float shade = fract(sin(dot(UV, vec2(12.9898, 78.233))) * 43758.5453);
shade = mix(-snow_color_variation, snow_color_variation, shade);
vec3 snow_albedo = clamp(global_snow_color.rgb + vec3(shade), 0.0, 1.0);
// Rain wetness
float rain_int = clamp(global_rain_intensity, 0.0, 1.0);
float rain_factor = wetness_darkening * rain_int;
// Combine: snow takes priority over rain
if (snow_mask > rain_factor) {
ALBEDO = snow_albedo;
ROUGHNESS = 0.15;
METALLIC = 0.0;
ALPHA = snow_mask;
} else if (rain_int > 0.01) {
ALBEDO = vec3(0.0);
ROUGHNESS = wet_roughness;
METALLIC = 0.0;
ALPHA = rain_factor;
} else {
ALPHA = 0.0;
}
}

View File

@@ -0,0 +1 @@
uid://do8puw7u8dvry

View File

@@ -0,0 +1,7 @@
[gd_resource type="ShaderMaterial" format=3]
[ext_resource type="Shader" path="res://core/daynight/weather_plain_shader.gdshader" id="1_weather_plain"]
[resource]
render_priority = 0
shader = ExtResource("1_weather_plain")

View File

@@ -2,7 +2,7 @@ class_name EnvironmentConfig
extends Resource
@export_group("Day")
@export var day_duration: float = 120.0 #Duration of a full day cycle in seconds
@export var day_duration: float = 300.0 #Duration of a full day cycle in seconds
#Ambient light color tinting for each time of day
@export_group("Directional Lights and Environment")

View File

@@ -14,6 +14,8 @@
[ext_resource type="PackedScene" uid="uid://jj15telqu3rp" path="res://docs/museums/daynight/scenes/grass_test/grass_test.tscn" id="7_pd1r3"]
[ext_resource type="PackedScene" uid="uid://bonjxfjcdnntt" path="res://docs/museums/daynight/scenes/grain_test/grain_test.tscn" id="7_w3se4"]
[ext_resource type="PackedScene" uid="uid://cahsl77384kf1" path="res://docs/museums/daynight/scenes/chunk_c_f_1/house_muraglione.tscn" id="9_pd1r3"]
[ext_resource type="PackedScene" uid="uid://d12t04rs47jq3" path="res://docs/museums/daynight/scenes/grain_test/tree_v1.tscn" id="13_d5ghv"]
[ext_resource type="PackedScene" uid="uid://dte4p23pp14pv" path="res://docs/museums/daynight/scenes/chunk_c_f_1/house_xl_4.tscn" id="15_28c1g"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_jiovi"]
fractal_lacunarity = 1.915
@@ -119,7 +121,7 @@ directional_shadow_mode = 0
directional_shadow_fade_start = 0.9
[node name="Camera3D" type="Camera3D" parent="." unique_id=1893906598]
transform = Transform3D(1, 0, 0, 0, 0.99452555, -0.10449375, 0, 0.10449375, 0.99452555, 0.48949432, 25.39013, 0)
transform = Transform3D(0.11505857, -0.10379978, -0.98792064, 1.2588453e-09, 0.99452555, -0.10449376, 0.99335873, 0.0120229, 0.11442869, -25.567848, 8.538193, -8.578517)
script = ExtResource("7_p2t1d")
[node name="Terrain" type="MeshInstance3D" parent="." unique_id=1335123628]
@@ -273,14 +275,23 @@ text = "Shadows"
[node name="Scene" type="Node" parent="." unique_id=701973010]
[node name="Grass" parent="Scene" unique_id=838519336 instance=ExtResource("7_pd1r3")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -14)
[node name="Grass2" parent="Scene" unique_id=838519336 instance=ExtResource("7_pd1r3")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.22852254, -28)
[node name="TreeTest3" parent="Scene" unique_id=1013890218 instance=ExtResource("13_d5ghv")]
transform = Transform3D(1.7, 0, 0, 0, 1.7, 0, 0, 0, 1.7, 0, 0, -29.149174)
[node name="Grass" parent="Scene" unique_id=2101001918 instance=ExtResource("7_pd1r3")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.22236729, -14)
[node name="Grain" parent="Scene" unique_id=1171350762 instance=ExtResource("7_w3se4")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.48330832, 0)
[node name="House_Muraglione" parent="Scene" unique_id=1060427946 instance=ExtResource("9_pd1r3")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.41167784, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.039560795, 0)
[node name="House_XL_4" parent="Scene" unique_id=1350238174 instance=ExtResource("15_28c1g")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.55439, 0.2020216, -14)
[connection signal="toggled" from="Control/Snow" to="Control" method="_on_snow_toggled"]
[connection signal="toggled" from="Control/Rain" to="Control" method="_on_rain_toggled"]

View File

@@ -1,6 +1,6 @@
[gd_resource type="ShaderMaterial" format=3 uid="uid://biaudrjlfoflm"]
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://docs/museums/daynight/scenes/grain_test/trunk_shader.gdshader" id="1_xfqg1"]
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="1_xfqg1"]
[ext_resource type="Texture2D" uid="uid://jn4seoee6vtw" path="res://docs/museums/daynight/scenes/chunk_c_f_1/texture_train.png" id="2_xfqg1"]
[resource]

View File

@@ -0,0 +1,26 @@
[gd_resource type="ShaderMaterial" format=3 uid="uid://dbmyfi5t0yfy"]
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="1_6vpqk"]
[ext_resource type="Texture2D" uid="uid://jn4seoee6vtw" path="res://docs/museums/daynight/scenes/chunk_c_f_1/texture_train.png" id="2_b63ar"]
[resource]
render_priority = 0
shader = ExtResource("1_6vpqk")
shader_parameter/albedo_color = Color(1, 1, 1, 1)
shader_parameter/albedo_texture = ExtResource("2_b63ar")
shader_parameter/use_texture = true
shader_parameter/uv_scale = Vector2(1, 1)
shader_parameter/palette_shift_y = 0.0
shader_parameter/gradient_start_y = 0.0
shader_parameter/gradient_end_y = 10.0
shader_parameter/light_steps = 3.0
shader_parameter/step_softness = 0.1
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
shader_parameter/shadow_offset = 0.0
shader_parameter/cast_shadow_strength = 0.6
shader_parameter/use_ghibli_glint = true
shader_parameter/glint_color = Color(1, 0.95, 0.85, 1)
shader_parameter/glint_intensity = 1.0
shader_parameter/glint_sharpness = 32.0
shader_parameter/emission_color = Color(0.63321626, 0.34243506, 0, 1)
shader_parameter/emission_energy = 6.000000285

View File

@@ -5,7 +5,7 @@
[sub_resource type="ShaderMaterial" id="ShaderMaterial_bdf8l"]
[node name="House_Muraglione" unique_id=1060427946 groups=["weather_materials", "wind_materials"] instance=ExtResource("1_m4ocs")]
[node name="House_Muraglione" unique_id=1060427946 groups=["weather_node"] instance=ExtResource("1_m4ocs")]
[node name="House_Muraglione" parent="." index="0" unique_id=517623360]
material_overlay = SubResource("ShaderMaterial_bdf8l")

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cl8c5n0nw30u"
path="res://.godot/imported/house_xl_4.fbx-5b59de66a298b550bfd49357cb802fd7.scn"
[deps]
source_file="res://docs/museums/daynight/scenes/chunk_c_f_1/house_xl_4.fbx"
dest_files=["res://.godot/imported/house_xl_4.fbx-5b59de66a298b550bfd49357cb802fd7.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=true
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

View File

@@ -0,0 +1,46 @@
[gd_scene format=3 uid="uid://dte4p23pp14pv"]
[ext_resource type="PackedScene" uid="uid://cl8c5n0nw30u" path="res://docs/museums/daynight/scenes/chunk_c_f_1/house_xl_4.fbx" id="1_r3art"]
[ext_resource type="Material" uid="uid://biaudrjlfoflm" path="res://docs/museums/daynight/scenes/chunk_c_f_1/house.tres" id="2_mswf7"]
[ext_resource type="Shader" uid="uid://dh3j2jp6defuk" path="res://core/daynight/weather_overlay.gdshader" id="2_wanxj"]
[ext_resource type="Material" uid="uid://dbmyfi5t0yfy" path="res://docs/museums/daynight/scenes/chunk_c_f_1/house_emissiv.tres" id="3_n3fsy"]
[sub_resource type="Gradient" id="Gradient_n4qy2"]
offsets = PackedFloat32Array(0.9980237, 1)
colors = PackedColorArray(0, 0, 0, 0.5882353, 0, 0, 0, 0)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_wanxj"]
gradient = SubResource("Gradient_n4qy2")
fill = 2
fill_from = Vector2(0.5, 0.5)
fill_to = Vector2(0.9017094, 0.12820514)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fprka"]
render_priority = 0
shader = ExtResource("2_wanxj")
shader_parameter/snow_noise_scale = 0.15
shader_parameter/snow_edge_softness = 0.2
shader_parameter/snow_roughness_variation = 0.15
shader_parameter/snow_color_variation = 0.05
shader_parameter/ripple_scale = 1.5
shader_parameter/ripple_speed = 2.0
shader_parameter/ripple_layers = 3.0
shader_parameter/streak_scale = 2.0
shader_parameter/streak_speed = 0.8
shader_parameter/wetness_darkening = 0.25
shader_parameter/wet_roughness = 0.05
shader_parameter/rain_normal_strength = 0.4
shader_parameter/puddle_noise_scale = 0.08
shader_parameter/puddle_threshold = 0.45
[node name="House_XL_4" unique_id=1350238174 groups=["weather_node"] instance=ExtResource("1_r3art")]
[node name="Shadow" type="Decal" parent="." index="0" unique_id=705347391]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.15501308)
size = Vector3(9, 0.5, 9)
texture_albedo = SubResource("GradientTexture2D_wanxj")
[node name="House_XL_4" parent="." index="1" unique_id=1851861956]
material_overlay = SubResource("ShaderMaterial_fprka")
surface_material_override/0 = ExtResource("2_mswf7")
surface_material_override/1 = ExtResource("3_n3fsy")

Binary file not shown.

View File

@@ -0,0 +1,44 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cl3xspxrqcyfg"
path="res://.godot/imported/fences.fbx-3c291507c986ba8c9235bf53fbb66890.scn"
[deps]
source_file="res://docs/museums/daynight/scenes/fences.fbx"
dest_files=["res://.godot/imported/fences.fbx-3c291507c986ba8c9235bf53fbb66890.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=true
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2

View File

@@ -0,0 +1,20 @@
[gd_resource type="ShaderMaterial" format=3 uid="uid://wkegx4a21x7u"]
[ext_resource type="Shader" uid="uid://d0ch5ofrgf7y6" path="res://core/daynight/trunk_shader.gdshader" id="1_k6owx"]
[resource]
render_priority = 0
shader = ExtResource("1_k6owx")
shader_parameter/albedo_color = Color(0.41427386, 0.22169134, 0.039388184, 1)
shader_parameter/use_texture = true
shader_parameter/uv_scale = Vector2(3, 3)
shader_parameter/palette_shift_y = 0.0
shader_parameter/gradient_start_y = 0.0
shader_parameter/gradient_end_y = 1.5
shader_parameter/light_steps = 3.0
shader_parameter/step_softness = 0.1
shader_parameter/shadow_color = Color(0.4, 0.4, 0.6, 1)
shader_parameter/shadow_offset = 0.0
shader_parameter/cast_shadow_strength = 0.6
shader_parameter/emission_color = Color(0, 0, 0, 1)
shader_parameter/emission_energy = 0.0

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
[gd_resource type="ShaderMaterial" format=3 uid="uid://2p8yqqg44ci3"]
[ext_resource type="Shader" uid="uid://cs0xl7pc6e26h" path="res://docs/museums/daynight/scenes/grain_test/tree_leaves.gdshader" id="1_etun4"]
[ext_resource type="Shader" uid="uid://cs0xl7pc6e26h" path="res://core/daynight/tree_leaves.gdshader" id="1_etun4"]
[ext_resource type="Texture2D" uid="uid://c0lkmyonx88hc" path="res://docs/museums/daynight/scenes/grain_test/grass_thin.png" id="2_grain"]
[resource]

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
[gd_resource type="ShaderMaterial" format=3 uid="uid://b1ej1sak6omli"]
[ext_resource type="Shader" uid="uid://co2jw3fnyc6aa" path="res://docs/museums/daynight/scenes/grain_test/tree_leaves.gdshader" id="1_2uy3m"]
[ext_resource type="Texture2D" uid="uid://b7sqjhecpoyoh" path="res://docs/museums/daynight/scenes/grain_test/leaf_test.png" id="2_2uy3m"]
[ext_resource type="Shader" uid="uid://cs0xl7pc6e26h" path="res://core/daynight/tree_leaves.gdshader" id="1_2uy3m"]
[ext_resource type="Texture2D" uid="uid://c3grftlmap4q5" path="res://docs/museums/daynight/scenes/grain_test/leaf_test.png" id="2_2uy3m"]
[resource]
render_priority = 0
@@ -14,7 +14,6 @@ shader_parameter/leaves_scale = 1.375
shader_parameter/rotation_degrees = 180.0
shader_parameter/texture_offset = Vector2(0, 0)
shader_parameter/opacity = 1.0
shader_parameter/snow_color = Color(0.85, 0.9, 0.95, 1)
shader_parameter/height_min = 6.0
shader_parameter/height_max = 11.0
shader_parameter/shadow_intensity = 0.800000038
@@ -22,3 +21,4 @@ shader_parameter/highlight_intensity = 0.0
shader_parameter/light_steps = 10.0
shader_parameter/random_mix = 0.0
shader_parameter/cast_shadow_strength = 0.0
shader_parameter/wetness_darkening = 0.25

View File

@@ -1,9 +1,9 @@
[gd_scene format=3 uid="uid://d12t04rs47jq3"]
[ext_resource type="PackedScene" uid="uid://cqlsf7plpx1tf" path="res://core/daynight/scenes/grain_test/tree_v1.fbx" id="1_8jt4o"]
[ext_resource type="Shader" uid="uid://do0tct77dfhef" path="res://core/daynight/snow.gdshader" id="3_h6257"]
[ext_resource type="Material" uid="uid://b2lg2y1k7grmo" path="res://core/daynight/scenes/grain_test/legno.tres" id="3_imfiy"]
[ext_resource type="Material" uid="uid://b1ej1sak6omli" path="res://core/daynight/scenes/grain_test/leaves2_mat.tres" id="4_8rfui"]
[ext_resource type="PackedScene" uid="uid://e1an0215p6k2" path="res://docs/museums/daynight/scenes/grain_test/tree_v1.fbx" id="1_8jt4o"]
[ext_resource type="Shader" uid="uid://do8puw7u8dvry" path="res://core/daynight/weather_plain_shader.gdshader" id="3_h6257"]
[ext_resource type="Material" path="res://docs/museums/daynight/scenes/grain_test/legno.tres" id="3_imfiy"]
[ext_resource type="Material" uid="uid://b1ej1sak6omli" path="res://docs/museums/daynight/scenes/grain_test/leaves2_mat.tres" id="4_8rfui"]
[sub_resource type="QuadMesh" id="QuadMesh_7kj6q"]
@@ -16,14 +16,17 @@ buffer = PackedFloat32Array(0.076886, 0.99803585, 0.0037512842, 1.8624028, 0.268
[sub_resource type="ShaderMaterial" id="ShaderMaterial_kpc41"]
render_priority = 0
shader = ExtResource("3_h6257")
shader_parameter/snow_color = Color(0.95, 0.98, 1, 1)
shader_parameter/snow_edge_softness = 0.15
shader_parameter/snow_color_variation = 0.05
shader_parameter/wetness_darkening = 0.25
shader_parameter/wet_roughness = 0.05
[sub_resource type="CylinderMesh" id="CylinderMesh_8rfui"]
[node name="TreeTest3" unique_id=838519336 instance=ExtResource("1_8jt4o")]
[node name="TreeTest3" unique_id=838519336 groups=["weather_node", "wind_node"] instance=ExtResource("1_8jt4o")]
transform = Transform3D(1.7, 0, 0, 0, 1.7, 0, 0, 0, 1.7, 0, 0, 0)
[node name="Leaf" parent="." index="0" unique_id=395059449]
[node name="Leaf" parent="." index="0" unique_id=770569390]
transform = Transform3D(100, 0, 0, 0, -4.3711384e-06, 99.99999, 0, -99.99999, -4.3711384e-06, 0, 0, 0)
cast_shadow = 3
@@ -34,7 +37,7 @@ material_override = ExtResource("4_8rfui")
cast_shadow = 0
multimesh = SubResource("MultiMesh_8rfui")
[node name="tree" parent="." index="1" unique_id=1568362771]
[node name="tree" parent="." index="1" unique_id=2045551637]
material_overlay = SubResource("ShaderMaterial_kpc41")
surface_material_override/0 = ExtResource("3_imfiy")

View File

@@ -1,6 +1,6 @@
[gd_resource type="ShaderMaterial" format=3 uid="uid://cudoptcrtgl7u"]
[ext_resource type="Shader" uid="uid://cs0xl7pc6e26h" path="res://docs/museums/daynight/scenes/grain_test/tree_leaves.gdshader" id="1_528a5"]
[ext_resource type="Shader" uid="uid://cs0xl7pc6e26h" path="res://core/daynight/tree_leaves.gdshader" id="1_528a5"]
[ext_resource type="Texture2D" uid="uid://ckm50mv8ejlki" path="res://docs/museums/daynight/scenes/grass_test/grass_round.png" id="2_4d6mx"]
[resource]

View File

@@ -1,6 +1,6 @@
[gd_resource type="ShaderMaterial" format=3 uid="uid://bjrb33qwp1p43"]
[ext_resource type="Shader" uid="uid://cs0xl7pc6e26h" path="res://docs/museums/daynight/scenes/grain_test/tree_leaves.gdshader" id="1_fqby2"]
[ext_resource type="Shader" uid="uid://cs0xl7pc6e26h" path="res://core/daynight/tree_leaves.gdshader" id="1_fqby2"]
[ext_resource type="Texture2D" uid="uid://cse6q7vqf14xo" path="res://docs/museums/daynight/scenes/grass_test/leaf_test2.png" id="2_0epvy"]
[resource]

View File

@@ -1,11 +1,11 @@
[gd_resource type="ShaderMaterial" format=3 uid="uid://0x17mj2v807r"]
[ext_resource type="Shader" uid="uid://cs0xl7pc6e26h" path="res://docs/museums/daynight/scenes/grain_test/tree_leaves.gdshader" id="1_qx1eq"]
[ext_resource type="Shader" uid="uid://cs0xl7pc6e26h" path="res://core/daynight/tree_leaves.gdshader" id="1_vpd27"]
[ext_resource type="Texture2D" uid="uid://ckm50mv8ejlki" path="res://docs/museums/daynight/scenes/grass_test/grass_round.png" id="2_wl0p2"]
[resource]
render_priority = 0
shader = ExtResource("1_qx1eq")
shader = ExtResource("1_vpd27")
shader_parameter/billboard_enabled = true
shader_parameter/wind_enabled = false
shader_parameter/base_color = Color(0.14700681, 0.45590013, 0.22758594, 1)

View File

@@ -27,7 +27,7 @@ instance_count = 40
mesh = SubResource("QuadMesh_rpt6v")
buffer = PackedFloat32Array(-1.001, 0, 0, -2.8797488, 0, 1.001, -5.966425e-08, -0.7477443, 0, -5.966425e-08, -1.001, -4.2194977, -1.001, 0, 0, -1.7037079, 0, 1.001, -5.966425e-08, -0.7477442, 0, -5.966425e-08, -1.001, -3.2446604, -1.001, 0, 0, 1.2830465, 0, 1.001, -5.966425e-08, -0.7477443, 0, -5.966425e-08, -1.001, -4.557446, -1.001, 0, 0, -5.028355, 0, 1.001, -5.966425e-08, -0.74774426, 0, -5.966425e-08, -1.001, -3.6429324, -1.001, 0, 0, -6.371053, 0, 1.001, -5.966425e-08, -0.7477439, 0, -5.966425e-08, -1.001, 4.1175256, 0, 0, -1.001, -1.5100684, 4.5406587e-08, 1.001, 0, -0.7477439, 1.001, -4.5406587e-08, 0, 4.42225, -1.001, 0, 0, -5.2487645, 0, 1.001, -5.966425e-08, -0.7477441, 0, -5.966425e-08, -1.001, -0.013931215, 0, 0, -1.001, 6.235317, 4.5406587e-08, 1.001, 0, -0.74774384, 1.001, -4.5406587e-08, 0, 6.248699, 0, 0, -1.001, 1.3825206, 4.5406587e-08, 1.001, 0, -0.7477441, 1.001, -4.5406587e-08, 0, 1.1873395, 0, 0, -1.001, 2.780786, 4.5406587e-08, 1.001, 0, -0.747744, 1.001, -4.5406587e-08, 0, 1.1765423, -1.001, 0, 0, 1.0532601, 0, 1.001, -5.966425e-08, -0.74774444, 0, -5.966425e-08, -1.001, -6.5395527, -1.001, 0, 0, -4.3666453, 0, 1.001, -5.966425e-08, -0.747744, 0, -5.966425e-08, -1.001, 1.6017916, -1.001, 0, 0, -1.3377903, 0, 1.001, -5.966425e-08, -0.7477441, 0, -5.966425e-08, -1.001, -0.6376221, 0, 0, -1.001, 5.4567842, 4.5406587e-08, 1.001, 0, -0.7477441, 1.001, -4.5406587e-08, 0, 0.5279622, 0, 0, -1.001, -1.2204466, 4.5406587e-08, 1.001, 0, -0.74774396, 1.001, -4.5406587e-08, 0, 1.4669147, -1.001, 0, 0, -5.0291324, 0, 1.001, -5.966425e-08, -0.74774426, 0, -5.966425e-08, -1.001, -3.9644425, 0, 0, -1.001, 4.144575, 4.5406587e-08, 1.001, 0, -0.7477443, 1.001, -4.5406587e-08, 0, -3.9907537, -1.001, 0, 0, -0.18894172, 0, 1.001, -5.966425e-08, -0.7477443, 0, -5.966425e-08, -1.001, -5.562557, 0, 0, -1.001, 3.410009, 4.5406587e-08, 1.001, 0, -0.74774396, 1.001, -4.5406587e-08, 0, 1.8935597, 0, 0, -1.001, -2.7810845, 4.5406587e-08, 1.001, 0, -0.7477439, 1.001, -4.5406587e-08, 0, 3.808044, -1.001, 0, 0, 0.284374, 0, 1.001, -5.966425e-08, -0.7477441, 0, -5.966425e-08, -1.001, -0.58144546, -1.001, 0, 0, -3.1262631, 0, 1.001, -5.966425e-08, -0.7477442, 0, -5.966425e-08, -1.001, -2.8066845, 0, 0, -1.001, 5.7749968, 4.5406587e-08, 1.001, 0, -0.7477441, 1.001, -4.5406587e-08, 0, 0.935482, -1.001, 0, 0, -5.218869, 0, 1.001, -5.966425e-08, -0.74774426, 0, -5.966425e-08, -1.001, -4.2917852, 0, 0, -1.001, 6.1626782, 4.5406587e-08, 1.001, 0, -0.7477441, 1.001, -4.5406587e-08, 0, 0.21193457, -1.001, 0, 0, 3.9669042, 0, 1.001, -5.966425e-08, -0.7477443, 0, -5.966425e-08, -1.001, -5.853158, 0, 0, -1.001, 2.2436643, 4.5406587e-08, 1.001, 0, -0.74774396, 1.001, -4.5406587e-08, 0, 3.1271167, 0, 0, -1.001, 2.4900956, 4.5406587e-08, 1.001, 0, -0.7477439, 1.001, -4.5406587e-08, 0, 3.9106765, 0, 0, -1.001, 5.5539966, 4.5406587e-08, 1.001, 0, -0.74774384, 1.001, -4.5406587e-08, 0, 6.162884, 0, 0, -1.001, -1.6500849, 4.5406587e-08, 1.001, 0, -0.74774384, 1.001, -4.5406587e-08, 0, 5.425037, 0, 0, -1.001, 1.2913516, 4.5406587e-08, 1.001, 0, -0.7477438, 1.001, -4.5406587e-08, 0, 5.9583297, 0, 0, -1.001, 3.403863, 4.5406587e-08, 1.001, 0, -0.7477441, 1.001, -4.5406587e-08, 0, -1.3604579, 0, 0, -1.001, 2.5133843, 4.5406587e-08, 1.001, 0, -0.7477441, 1.001, -4.5406587e-08, 0, -1.2172651, 0, 0, -1.001, -1.865159, 4.5406587e-08, 1.001, 0, -0.74774396, 1.001, -4.5406587e-08, 0, 2.02114, -1.001, 0, 0, -2.1462004, 0, 1.001, -5.966425e-08, -0.747744, 0, -5.966425e-08, -1.001, 1.2531993, 0, 0, -1.001, 6.005666, 4.5406587e-08, 1.001, 0, -0.747744, 1.001, -4.5406587e-08, 0, 1.2401769, 0, 0, -1.001, 2.402935, 4.5406587e-08, 1.001, 0, -0.7477439, 1.001, -4.5406587e-08, 0, 2.778954, -1.001, 0, 0, -6.482737, 0, 1.001, -5.966425e-08, -0.74774384, 0, -5.966425e-08, -1.001, 5.1091228, -1.001, 0, 0, 0.6619804, 0, 1.001, -5.966425e-08, -0.74774414, 0, -5.966425e-08, -1.001, -1.2692692, -1.001, 0, 0, 3.7678468, 0, 1.001, -5.966425e-08, -0.74774426, 0, -5.966425e-08, -1.001, -4.5863547)
[node name="Grass" unique_id=838519336 groups=["wind_materials"] instance=ExtResource("1_1rhib")]
[node name="Grass" unique_id=838519336 groups=["weather_vegetables_node", "wind_node"] instance=ExtResource("1_1rhib")]
[node name="Leaf" parent="." index="0" unique_id=770569390]
visible = false

File diff suppressed because one or more lines are too long

View File

@@ -28,8 +28,9 @@ window/stretch/aspect="expand"
[global_group]
wind_materials="Materials to apply wind"
weather_materials=""
weather_vegetables_node=""
wind_node="Materials to apply wind"
weather_node=""
[physics]

BIN
snow.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 KiB

40
snow.jpg.import Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d2sydag8o7r8f"
path="res://.godot/imported/snow.jpg-51a2902860b21a02a582c65a2470860d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://snow.jpg"
dest_files=["res://.godot/imported/snow.jpg-51a2902860b21a02a582c65a2470860d.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