replace realtime shadows with decal shadows

This commit is contained in:
Teatov 2024-10-21 16:36:24 +10:00
parent 04337f7563
commit 863d6b409a
8 changed files with 65 additions and 9 deletions

BIN
assets/textures/shadow.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://4hyvuk7g4257"
path.s3tc="res://.godot/imported/shadow.png-328688ec38be5c43985df6ec2f19367f.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://assets/textures/shadow.png"
dest_files=["res://.godot/imported/shadow.png-328688ec38be5c43985df6ec2f19367f.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
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/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=0

View File

@ -3,25 +3,26 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cn2v03dkwjdbd"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
path.s3tc="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.s3tc.ctex"
metadata={
"vram_texture": false
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.s3tc.ctex"]
[params]
compress/mode=0
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
@ -31,7 +32,7 @@ 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
detect_3d/compress_to=0
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -86,6 +86,7 @@ toggle_confinement={
[layer_names]
3d_render/layer_6="ground"
3d_physics/layer_1="default"
3d_physics/layer_2="units"
3d_physics/layer_3="Layer 3"

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=7 format=3 uid="uid://dx544tb0so0b4"]
[gd_scene load_steps=8 format=3 uid="uid://dx544tb0so0b4"]
[ext_resource type="Script" path="res://scripts/items/honeydew.gd" id="1_6fg3d"]
[ext_resource type="Material" uid="uid://c33we3533cr8k" path="res://resources/materials/honeydew_mat.tres" id="2_fnxpb"]
[ext_resource type="Material" uid="uid://f0nlf4tdpvbd" path="res://resources/materials/indicators/hover_indicator_mat.tres" id="3_cofwb"]
[ext_resource type="Texture2D" uid="uid://4hyvuk7g4257" path="res://assets/textures/shadow.png" id="4_goini"]
[sub_resource type="QuadMesh" id="QuadMesh_6pru1"]
material = ExtResource("2_fnxpb")
@ -32,3 +33,10 @@ shape = SubResource("SphereShape3D_8lnyq")
transform = Transform3D(0.66646, 0, 0, 0, 0.66646, 0, 0, 0, 0.66646, 0, -0.0175649, 0)
cast_shadow = 0
mesh = SubResource("QuadMesh_qwehm")
[node name="Decal" type="Decal" parent="."]
size = Vector3(0.5, 0.5, 0.5)
texture_albedo = ExtResource("4_goini")
modulate = Color(0, 0, 0, 1)
albedo_mix = 0.25
cull_mask = 32

View File

@ -6,4 +6,5 @@
[node name="Ground" instance=ExtResource("1_wapwq")]
[node name="ground" parent="." index="0"]
layers = 32
surface_material_override/0 = ExtResource("2_pmgjw")

View File

@ -1,8 +1,9 @@
[gd_scene load_steps=6 format=3 uid="uid://c70vx0utm5knp"]
[gd_scene load_steps=7 format=3 uid="uid://c70vx0utm5knp"]
[ext_resource type="Script" path="res://scripts/units/abstract/unit.gd" id="1_ulhs6"]
[ext_resource type="Material" uid="uid://f0nlf4tdpvbd" path="res://resources/materials/indicators/hover_indicator_mat.tres" id="2_uk1jy"]
[ext_resource type="Script" path="res://scripts/sound_effects_player.gd" id="3_wl62h"]
[ext_resource type="Texture2D" uid="uid://4hyvuk7g4257" path="res://assets/textures/shadow.png" id="4_iixjt"]
[sub_resource type="QuadMesh" id="QuadMesh_igohi"]
material = ExtResource("2_uk1jy")
@ -53,3 +54,10 @@ script = ExtResource("3_wl62h")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.25, 0)
attenuation_model = 1
attenuation_filter_db = 0.0
[node name="Decal" type="Decal" parent="."]
size = Vector3(1, 1, 1)
texture_albedo = ExtResource("4_iixjt")
modulate = Color(0, 0, 0, 1)
albedo_mix = 0.5
cull_mask = 32

View File

@ -49,7 +49,6 @@ environment = SubResource("Environment_nnr3k")
[node name="SunLight" type="DirectionalLight3D" parent="Static"]
transform = Transform3D(0.707107, -0.5, 0.5, 0, 0.707107, 0.707107, -0.707107, -0.5, 0.5, 0, 0, 0)
shadow_enabled = true
[node name="Units" type="Node" parent="."]