mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-22 19:43:55 +00:00
3D Lights and shadows
This commit is contained in:
parent
b17ef45678
commit
f3edc2b433
13 changed files with 2409 additions and 2173 deletions
|
|
@ -0,0 +1,25 @@
|
|||
[gd_resource type="Resource" script_class="FuncGodotFGDPointClass" load_steps=4 format=3 uid="uid://tqytdmynf2ko"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://bpiblsew5s5so" path="res://3D/TrenchBroom/EntityDefinitions/base/light_base.tres" id="1_dnvj2"]
|
||||
[ext_resource type="PackedScene" uid="uid://cnnm5cqi1xfoc" path="res://3D/Scenes/Lights/OmniLight3DSpecial.tscn" id="2_dnvj2"]
|
||||
[ext_resource type="Script" uid="uid://c83r7t467hm4m" path="res://addons/func_godot/src/fgd/func_godot_fgd_point_class.gd" id="2_mtfeu"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_mtfeu")
|
||||
scene_file = ExtResource("2_dnvj2")
|
||||
apply_rotation_on_map_build = false
|
||||
apply_scale_on_map_build = true
|
||||
classname = "light_special"
|
||||
description = "Special Light entity with two sub spot lights for shadows"
|
||||
func_godot_internal = false
|
||||
base_classes = Array[Resource]([ExtResource("1_dnvj2")])
|
||||
class_properties = {
|
||||
"range": 320.0
|
||||
}
|
||||
class_property_descriptions = {
|
||||
"range": "The light's radius in Quake Units. The entity script converts this to Godot Units in the LightOmni script."
|
||||
}
|
||||
auto_apply_to_matching_node_properties = false
|
||||
meta_properties = {}
|
||||
node_class = "OmniLight3D"
|
||||
name_property = ""
|
||||
15
3D/TrenchBroom/EntityScripts/Lights/SpecialSubSpotLight.cs
Normal file
15
3D/TrenchBroom/EntityScripts/Lights/SpecialSubSpotLight.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno._3D.TrenchBroom.EntityScripts.Lights;
|
||||
|
||||
[Tool]
|
||||
public partial class SpecialSubSpotLight : SpotLight3D
|
||||
{
|
||||
public override void _Ready()
|
||||
{
|
||||
var parent = GetParent<OmniLight3D>();
|
||||
this.SpotRange = parent.OmniRange;
|
||||
this.SpotAttenuation = parent.OmniAttenuation;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://c8k0yi3krclkl
|
||||
7
3D/TrenchBroom/EntityScripts/Lights/light_special.gd
Normal file
7
3D/TrenchBroom/EntityScripts/Lights/light_special.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
@tool
|
||||
class_name LightSpecial
|
||||
extends OmniLight3D
|
||||
|
||||
func _func_godot_apply_properties(props: Dictionary) -> void:
|
||||
#LightBase._func_godot_apply_properties(self, props)
|
||||
omni_range = (props["range"] as float) * TbManager.INVERSE_SCALE
|
||||
1
3D/TrenchBroom/EntityScripts/Lights/light_special.gd.uid
Normal file
1
3D/TrenchBroom/EntityScripts/Lights/light_special.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ysbgwxewn4kr
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=38 format=3 uid="uid://b700sa4be6dfa"]
|
||||
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=39 format=3 uid="uid://b700sa4be6dfa"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://ia1t5p4mhom3" path="res://3D/TrenchBroom/EntityDefinitions/point/lights/light_omni.tres" id="1_7vcj1"]
|
||||
[ext_resource type="Script" uid="uid://cknmd0lgmorx2" path="res://addons/func_godot/src/fgd/func_godot_fgd_file.gd" id="1_lykim"]
|
||||
|
|
@ -37,6 +37,7 @@
|
|||
[ext_resource type="Resource" uid="uid://cr3xqfglolihb" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/Actor_Furniture_ComputerTower.tres" id="34_wy0ht"]
|
||||
[ext_resource type="Resource" uid="uid://m0xahs14etiy" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/Actor_SecurityCamera.tres" id="35_3jqmy"]
|
||||
[ext_resource type="Resource" uid="uid://db7vsj36v1m2e" path="res://3D/TrenchBroom/EntityDefinitions/point/actors/Actor_Wallfan.tres" id="36_p5b6l"]
|
||||
[ext_resource type="Resource" uid="uid://tqytdmynf2ko" path="res://3D/TrenchBroom/EntityDefinitions/point/lights/light_special.tres" id="37_53o7h"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_lykim")
|
||||
|
|
@ -44,5 +45,5 @@ export_file = false
|
|||
target_map_editor = 1
|
||||
fgd_name = "FuncGodot"
|
||||
base_fgd_files = Array[Resource]([])
|
||||
entity_definitions = Array[Resource]([ExtResource("1_7vcj1"), ExtResource("2_u7uvb"), ExtResource("3_u7uvb"), ExtResource("4_1nmxk"), ExtResource("5_ljb2x"), ExtResource("6_seuvu"), ExtResource("7_fmwex"), ExtResource("8_c8m8m"), ExtResource("9_14sjf"), ExtResource("10_xik3w"), ExtResource("11_dgiqm"), ExtResource("12_1teik"), ExtResource("13_f0hti"), ExtResource("14_6ld6e"), ExtResource("15_g8j5j"), ExtResource("16_7h4of"), ExtResource("17_m3sbm"), ExtResource("18_m3sbm"), ExtResource("19_hvhb8"), ExtResource("20_3v5us"), ExtResource("21_g67cj"), ExtResource("22_iy67w"), ExtResource("23_b5lmu"), ExtResource("24_ndas4"), ExtResource("25_n7wsi"), ExtResource("26_v48k5"), ExtResource("27_ombvk"), ExtResource("28_31lma"), ExtResource("29_louv0"), ExtResource("30_wfgfu"), ExtResource("31_elv2e"), ExtResource("32_elv2e"), ExtResource("33_aawmv"), ExtResource("34_wy0ht"), ExtResource("35_3jqmy"), ExtResource("36_p5b6l")])
|
||||
entity_definitions = Array[Resource]([ExtResource("1_7vcj1"), ExtResource("2_u7uvb"), ExtResource("3_u7uvb"), ExtResource("4_1nmxk"), ExtResource("5_ljb2x"), ExtResource("6_seuvu"), ExtResource("7_fmwex"), ExtResource("8_c8m8m"), ExtResource("9_14sjf"), ExtResource("10_xik3w"), ExtResource("11_dgiqm"), ExtResource("12_1teik"), ExtResource("13_f0hti"), ExtResource("14_6ld6e"), ExtResource("15_g8j5j"), ExtResource("16_7h4of"), ExtResource("17_m3sbm"), ExtResource("18_m3sbm"), ExtResource("19_hvhb8"), ExtResource("20_3v5us"), ExtResource("21_g67cj"), ExtResource("22_iy67w"), ExtResource("23_b5lmu"), ExtResource("24_ndas4"), ExtResource("25_n7wsi"), ExtResource("26_v48k5"), ExtResource("27_ombvk"), ExtResource("28_31lma"), ExtResource("29_louv0"), ExtResource("30_wfgfu"), ExtResource("31_elv2e"), ExtResource("32_elv2e"), ExtResource("33_aawmv"), ExtResource("34_wy0ht"), ExtResource("35_3jqmy"), ExtResource("36_p5b6l"), ExtResource("37_53o7h")])
|
||||
metadata/_custom_type_script = "uid://cknmd0lgmorx2"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue