Shadows decals

This commit is contained in:
MaddoScientisto 2025-12-28 22:53:31 +01:00
commit 1dfce7802b
12 changed files with 5344 additions and 1520 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=40 format=3 uid="uid://bh3vxmqflijgj"]
[gd_scene load_steps=38 format=3 uid="uid://bh3vxmqflijgj"]
[ext_resource type="Script" uid="uid://dwregubt4iila" path="res://Scripts/Components/FSM/Enemy/3D/EnemyProxy3D.cs" id="1_a3crc"]
[ext_resource type="Resource" uid="uid://ccym6mcq4fbul" path="res://Resources/Enemies/Fairy_Guard_3D.tres" id="2_jgarc"]
@ -23,11 +23,11 @@
[ext_resource type="Script" uid="uid://bvcfa6wivpgy1" path="res://Scripts/Components/FSM/Enemy/3D/EnemyDamageModule3D.cs" id="16_27vgy"]
[ext_resource type="Script" uid="uid://dmawekjfas6k8" path="res://Scripts/Components/Actors/DamageReceiver3D.cs" id="17_tabhk"]
[ext_resource type="Script" uid="uid://cqwvssstkrdmw" path="res://Scripts/Components/Actors/ActorResourceProvider.cs" id="18_4fnoq"]
[ext_resource type="Script" uid="uid://dvln1783wvvuw" path="res://Scripts/Components/Actors/ShadowProvider.cs" id="19_4fnoq"]
[ext_resource type="Script" uid="uid://qrdor3gk6x37" path="res://Scripts/Components/FSM/Enemy/3D/GravityProvider.cs" id="25_qg061"]
[ext_resource type="Script" uid="uid://khph8rethll7" path="res://Scripts/Components/Actors/3D/EnemySoundModule3D.cs" id="26_ojvcb"]
[ext_resource type="Texture2D" uid="uid://bf37ce6jskdel" path="res://Sprites/SmallHitbox.png" id="27_bh48e"]
[ext_resource type="Script" uid="uid://buvtqwl5fvwxk" path="res://Scripts/Components/Actors/3D/EnemyDropModule3D.cs" id="28_2ut2v"]
[ext_resource type="Texture2D" uid="uid://dq60rr6ejqd2t" path="res://Sprites/Actors/Shadow-Blob_001.png" id="28_t121s"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jgarc"]
radius = 0.343
@ -55,15 +55,6 @@ radius = 3.04834
height = 0.853027
radius = 0.426758
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_cc7e7"]
transparency = 1
depth_draw_mode = 2
shading_mode = 0
albedo_color = Color(0, 0, 0, 0.235294)
[sub_resource type="QuadMesh" id="QuadMesh_05pdu"]
material = SubResource("StandardMaterial3D_cc7e7")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_j6bpw"]
render_priority = 1
transparency = 1
@ -228,13 +219,6 @@ shape = SubResource("CylinderShape3D_uv2lf")
script = ExtResource("18_4fnoq")
ResourceName = "Health"
[node name="Shadow" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, -0.29, 0)
mesh = SubResource("QuadMesh_05pdu")
script = ExtResource("19_4fnoq")
AutoEnable = false
CollisionMask = 1
[node name="GravityProvider" type="Node" parent="."]
script = ExtResource("25_qg061")
Gravity = -20.0
@ -274,6 +258,13 @@ sprite_frames = SubResource("SpriteFrames_t121s")
script = ExtResource("28_2ut2v")
StorageModule = NodePath("../Storage")
[node name="Shadow2" type="Decal" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.13562012, -0.118652344, 0.13336182)
size = Vector3(0.5, 0.7373047, 0.5)
texture_albedo = ExtResource("28_t121s")
normal_fade = 0.5
cull_mask = 1048574
[connection signal="body_entered" from="PlayerDetectionProvider" to="PlayerDetectionProvider" method="_on_body_entered"]
[connection signal="body_exited" from="PlayerDetectionProvider" to="PlayerDetectionProvider" method="_on_body_exited"]
[connection signal="velocity_computed" from="NavigationAgent3D" to="NavigationProvider" method="_on_navigation_agent_3d_velocity_computed"]

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=72 format=3 uid="uid://rimplblbptcd"]
[gd_scene load_steps=70 format=3 uid="uid://rimplblbptcd"]
[ext_resource type="Script" uid="uid://88smibkin17p" path="res://Scripts/Components/FSM/3DPlayer/IsoPlayerFSMProxy.cs" id="1_cc7e7"]
[ext_resource type="Texture2D" uid="uid://ddwhrlrgj6i00" path="res://Sprites/Actors/Cirno.png" id="1_vex34"]
@ -17,9 +17,7 @@
[ext_resource type="Material" uid="uid://dsrsfpcpwmaql" path="res://Resources/Materials/Player_Blink_Teleport_Material_3D.tres" id="7_yarib"]
[ext_resource type="Script" uid="uid://bayjsi428yx83" path="res://Scripts/Components/FSM/3DPlayer/UnTeleporting.cs" id="8_nk07c"]
[ext_resource type="Script" uid="uid://1fryvj4omkin" path="res://Scripts/Components/Actors/MouseAimProvider3D.cs" id="9_2ffwi"]
[ext_resource type="Script" uid="uid://c8ar11sg0su2h" path="res://Scripts/Components/FSM/3DPlayer/ShadowModule.cs" id="9_fg04g"]
[ext_resource type="Script" uid="uid://ceiworv2pgl1r" path="res://Scripts/Components/Actors/3D/AnimatedShaderSprite3D.cs" id="9_yarib"]
[ext_resource type="Script" uid="uid://dvln1783wvvuw" path="res://Scripts/Components/Actors/ShadowProvider.cs" id="10_2kukh"]
[ext_resource type="Script" uid="uid://bm73kgly8gv2i" path="res://Scripts/Components/FSM/3DPlayer/IsoInteractionController.cs" id="10_habpy"]
[ext_resource type="Script" uid="uid://d1ixvdcii6uy7" path="res://Scripts/Components/FSM/3DPlayer/SelectorController.cs" id="11_4cdxq"]
[ext_resource type="Script" uid="uid://vne180ohyucn" path="res://Scripts/Components/FSM/3DPlayer/IsoActivationProvider.cs" id="11_4exx2"]
@ -40,20 +38,12 @@
[ext_resource type="Script" uid="uid://byiv30s1ahdyh" path="res://Scripts/Components/Actors/3D/PlayerCrosshairModule3D.cs" id="33_iw7um"]
[ext_resource type="Texture2D" uid="uid://cf2855sd3hqty" path="res://Sprites/Actors/Aiming_Reticule_Small.png" id="34_chmen"]
[ext_resource type="Script" uid="uid://pqsd8h60urrc" path="res://Scripts/Components/FSM/3DPlayer/PlayerGrazingModule3D.cs" id="39_gndug"]
[ext_resource type="Texture2D" uid="uid://dq60rr6ejqd2t" path="res://Sprites/Actors/Shadow-Blob_001.png" id="41_10kkd"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_fg04g"]
radius = 0.342937
height = 0.685874
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2kukh"]
transparency = 1
depth_draw_mode = 2
shading_mode = 0
albedo_color = Color(0, 0, 0, 0.235294)
[sub_resource type="QuadMesh" id="QuadMesh_fg04g"]
material = SubResource("StandardMaterial3D_2kukh")
[sub_resource type="CylinderShape3D" id="CylinderShape3D_habpy"]
height = 0.679688
@ -214,6 +204,8 @@ animations = [{
height = 0.91430664
radius = 0.80566406
[sub_resource type="BoxMesh" id="BoxMesh_gndug"]
[node name="IsoPlayerFsm" type="CharacterBody3D" node_paths=PackedStringArray("PlayerFSM")]
collision_layer = 2
collision_mask = 1553
@ -233,7 +225,7 @@ _inputProvider = NodePath("../../InputProvider")
AnimationProvider = NodePath("../../AnimationProvider")
Storage = NodePath("../../Storage")
DamageReceiver = NodePath("../../DamageReceiver")
_moduleNodes = [NodePath("../../InputProvider"), NodePath("../../MovementModule"), NodePath("../../ShadowModule"), NodePath("../../InteractionController"), NodePath("../../ActivationProvider"), NodePath("../../WeaponModule"), NodePath("../../CrosshairModule"), NodePath("../../GrazingModule")]
_moduleNodes = [NodePath("../../InputProvider"), NodePath("../../MovementModule"), null, NodePath("../../InteractionController"), NodePath("../../ActivationProvider"), NodePath("../../WeaponModule"), NodePath("../../CrosshairModule"), NodePath("../../GrazingModule")]
[node name="Dead" type="Node" parent="StateMachine" node_paths=PackedStringArray("_motivationProvider", "_inputProvider", "_healthProvider", "_animationProvider")]
script = ExtResource("5_ok250")
@ -319,18 +311,6 @@ script = ExtResource("9_2ffwi")
[node name="InputProvider" type="Node" parent="."]
script = ExtResource("7_4cdxq")
[node name="Shadow" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, -0.29, 0)
mesh = SubResource("QuadMesh_fg04g")
script = ExtResource("10_2kukh")
AutoEnable = false
MaxShadowScale = 1.0
CollisionMask = 1
[node name="ShadowModule" type="Node" parent="." node_paths=PackedStringArray("ShadowProvider")]
script = ExtResource("9_fg04g")
ShadowProvider = NodePath("../Shadow")
[node name="InteractionController" type="Area3D" parent="."]
collision_layer = 2
collision_mask = 0
@ -476,5 +456,18 @@ Shield = NodePath("../DamageReceiver/ShieldProvider")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.12463379, 0)
shape = SubResource("CylinderShape3D_nk07c")
[node name="Shadow" type="Decal" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.101867676, -0.35475922, 0.10064697)
size = Vector3(0.5, 0.74853516, 0.5)
texture_albedo = ExtResource("41_10kkd")
normal_fade = 0.5
cull_mask = 1048574
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.7139473, 0)
visible = false
layers = 2
mesh = SubResource("BoxMesh_gndug")
[connection signal="area_entered" from="AcidDetector" to="AcidDeathModule" method="OnAcidCollision"]
[connection signal="area_entered" from="DamageReceiver" to="DamageReceiver" method="_on_damage_hitbox_area_entered"]

View file

@ -1,9 +1,10 @@
[gd_scene load_steps=8 format=3 uid="uid://d28e1t2c0lwbp"]
[gd_scene load_steps=9 format=3 uid="uid://d28e1t2c0lwbp"]
[ext_resource type="Script" uid="uid://cg6y36s7buapp" path="res://Scripts/Weapons/Bullet3D.cs" id="1_xnqcl"]
[ext_resource type="Texture2D" uid="uid://cfldr7l7dearo" path="res://Sprites/Bullets/mid_bullet_red.png" id="2_xnqcl"]
[ext_resource type="AudioStream" uid="uid://b3rm0vj6x54k4" path="res://SFX/th_knockoff_sfx/click_collect.wav" id="3_xyes7"]
[ext_resource type="Material" uid="uid://ogkwkokxevat" path="res://Resources/Particles/graze_particle_3D.tres" id="4_t5ure"]
[ext_resource type="Texture2D" uid="uid://dq60rr6ejqd2t" path="res://Sprites/Actors/Shadow-Blob_001.png" id="5_nd0aw"]
[sub_resource type="SphereShape3D" id="SphereShape3D_pklkt"]
radius = 0.161126
@ -49,6 +50,14 @@ local_coords = true
process_material = ExtResource("4_t5ure")
draw_pass_1 = SubResource("QuadMesh_nd0aw")
[node name="Shadow" type="Decal" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.36669922, 0)
size = Vector3(0.5, 1.2333984, 0.5)
texture_albedo = ExtResource("5_nd0aw")
modulate = Color(1, 1, 1, 0.5)
normal_fade = 0.5
cull_mask = 1048574
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="screen_exited" from="VisibleOnScreenNotifier" to="." method="_on_visible_on_screen_notifier_2d_screen_exited"]

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://c133312rx63ps"]
[gd_scene load_steps=5 format=3 uid="uid://c133312rx63ps"]
[ext_resource type="Script" uid="uid://cg6y36s7buapp" path="res://Scripts/Weapons/Bullet3D.cs" id="1_ojpd6"]
[ext_resource type="Texture2D" uid="uid://bdyd0bht18n47" path="res://Sprites/EnemyProjectile.png" id="2_ojpd6"]
[ext_resource type="Texture2D" uid="uid://dq60rr6ejqd2t" path="res://Sprites/Actors/Shadow-Blob_001.png" id="3_7vcns"]
[sub_resource type="SphereShape3D" id="SphereShape3D_pklkt"]
radius = 0.083358
@ -24,6 +25,13 @@ shape = SubResource("SphereShape3D_pklkt")
[node name="VisibleOnScreenNotifier" type="VisibleOnScreenNotifier3D" parent="."]
[node name="Shadow" type="Decal" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.3623047, 0)
size = Vector3(0.5, 1.2246094, 0.5)
texture_albedo = ExtResource("3_7vcns")
normal_fade = 0.5
cull_mask = 1048574
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="screen_exited" from="VisibleOnScreenNotifier" to="." method="_on_visible_on_screen_notifier_2d_screen_exited"]

View file

@ -1,9 +1,10 @@
[gd_scene load_steps=8 format=3 uid="uid://crcdug04y1dxy"]
[gd_scene load_steps=9 format=3 uid="uid://crcdug04y1dxy"]
[ext_resource type="Script" uid="uid://cg6y36s7buapp" path="res://Scripts/Weapons/Bullet3D.cs" id="1_1hlxa"]
[ext_resource type="Texture2D" uid="uid://dooyhu8vt63vm" path="res://Sprites/Bullets/mid_bullet_blue.png" id="2_1hlxa"]
[ext_resource type="AudioStream" uid="uid://b3rm0vj6x54k4" path="res://SFX/th_knockoff_sfx/click_collect.wav" id="3_4sq4m"]
[ext_resource type="Material" uid="uid://ogkwkokxevat" path="res://Resources/Particles/graze_particle_3D.tres" id="4_83jmy"]
[ext_resource type="Texture2D" uid="uid://dq60rr6ejqd2t" path="res://Sprites/Actors/Shadow-Blob_001.png" id="5_a0er3"]
[sub_resource type="SphereShape3D" id="SphereShape3D_pklkt"]
radius = 0.161126
@ -49,6 +50,13 @@ local_coords = true
process_material = ExtResource("4_83jmy")
draw_pass_1 = SubResource("QuadMesh_nd0aw")
[node name="Shadow" type="Decal" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.40163803, 0)
size = Vector3(0.5, 1.1991043, 0.5)
texture_albedo = ExtResource("5_a0er3")
normal_fade = 0.5
cull_mask = 1048574
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="screen_exited" from="VisibleOnScreenNotifier" to="." method="_on_visible_on_screen_notifier_2d_screen_exited"]

View file

@ -23,7 +23,7 @@ public partial class EnemyMarker3D : PreviewMarker3D, IActivable
if (Engine.IsEditorHint())
{
//QueueRedraw();
this.Texture = _enemy.IconSprite;
this.Texture = _enemy?.IconSprite;
}
}
}
@ -76,7 +76,11 @@ public partial class EnemyMarker3D : PreviewMarker3D, IActivable
//SetSpriteAlpha(0.5f);
}
var asdf = props["asdf"].AsString();
GD.Print(asdf);
var scriptPath = props["resource_path"].AsString();
GD.Print(scriptPath);
if (!string.IsNullOrWhiteSpace(scriptPath))
{
Enemy = GD.Load<EnemyResource>(scriptPath);

View file

@ -19,11 +19,29 @@ int PSXDither(ivec2 fragcoord) {
-3, +1, -4, +0,
+3, -1, +2, -2
};
const int dither_table2[16] = {
+0, +8, 2, +10,
+12, -4, +14, +6,
+3, +11, +1, +9,
+15, +7, +13, +5
};
const int dither_table_8[64] = {
0, 32, 8, 40, 2, 34, 10, 42,
48, 16, 56, 24, 50, 18, 58, 26,
12, 44, 4, 36, 14, 46, 6, 38,
60, 28, 52, 20, 62, 30, 54, 22,
3, 35, 11, 43, 1, 33, 9, 41,
51, 19, 59, 27, 49, 17, 57, 25,
15, 47, 7, 39, 13, 45, 5, 37,
63, 31, 55, 23, 61, 29, 53, 21
};
int x = fragcoord.x % 4;
int y = fragcoord.y % 4;
return dither_table[y * 4 + x];
return dither_table_8[y * 4 + x];
}
void fragment(){

BIN
Sprites/Actors/Shadow-Blob_001.png (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dq60rr6ejqd2t"
path="res://.godot/imported/Shadow-Blob_001.png-94e9b9bbcec603b1ff5d247e6844b1b0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Sprites/Actors/Shadow-Blob_001.png"
dest_files=["res://.godot/imported/Shadow-Blob_001.png-94e9b9bbcec603b1ff5d247e6844b1b0.ctex"]
[params]
compress/mode=3
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=0

View file

@ -171,8 +171,8 @@ enabled=PackedStringArray("res://addons/cyclops_level_builder/plugin.cfg", "res:
[func_godot]
default_map_settings="uid://cx41lsryg5wpm"
default_inverse_scale_factor=1.0
default_map_settings="res://3D/TrenchBroom/map_settings.tres"
default_inverse_scale_factor=16.0
model_point_class_save_path="3D/MapModels"
[global_group]
@ -389,6 +389,8 @@ locale/translations=PackedStringArray("res://Dialogue/Translations/dialogic_char
[layer_names]
3d_render/layer_1="Sprites"
3d_render/layer_2="World"
2d_physics/layer_1="world"
2d_navigation/layer_1="Walkable"
3d_physics/layer_1="World"