Visual flickering in particle beam glow light

This commit is contained in:
Rob Kelly 2025-03-12 16:11:15 -06:00
parent b4166f452b
commit b4b133b76c
6 changed files with 18 additions and 2 deletions

View File

@ -381,7 +381,7 @@ data = PackedVector3Array(-1.5, 0, -6, -1.5, 0, 6, -1.5, 3, -6, -1.5, 3, -6, -1.
environment = SubResource("Environment_cc548") environment = SubResource("Environment_cc548")
[node name="OmniLight3D" type="OmniLight3D" parent="."] [node name="OmniLight3D" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.16, 0) transform = Transform3D(0.5, 0, -0.866025, 0, 1, 0, 0.866025, 0, 0.5, 0, 2.16, 0)
light_energy = 8.0 light_energy = 8.0
shadow_enabled = true shadow_enabled = true
omni_range = 20.0 omni_range = 20.0

View File

@ -0,0 +1,8 @@
extends OmniLight3D
@export var mean_energy := 0.3
@export var st_dev_energy := 0.025
func _process(_delta: float) -> void:
light_energy = randfn(mean_energy, st_dev_energy)

View File

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

View File

@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=3 uid="uid://b8vradbaw61ga"] [gd_scene load_steps=4 format=3 uid="uid://b8vradbaw61ga"]
[ext_resource type="Script" uid="uid://bqgi5p5nh6k1l" path="res://src/equipment/laser_cast/laser_cast.gd" id="1_xntcr"] [ext_resource type="Script" uid="uid://bqgi5p5nh6k1l" path="res://src/equipment/laser_cast/laser_cast.gd" id="1_xntcr"]
[ext_resource type="PackedScene" uid="uid://oc6t5ubyybsa" path="res://src/effects/laser_dust.tscn" id="2_m5xmf"] [ext_resource type="PackedScene" uid="uid://oc6t5ubyybsa" path="res://src/effects/laser_dust.tscn" id="2_m5xmf"]
[ext_resource type="Script" uid="uid://br7war1wh7wfd" path="res://src/equipment/laser_cast/flicker_light.gd" id="3_bkg64"]
[node name="LaserCast" type="RayCast3D"] [node name="LaserCast" type="RayCast3D"]
target_position = Vector3(0, 0, -2) target_position = Vector3(0, 0, -2)
@ -18,3 +19,5 @@ light_color = Color(0, 1, 0.301961, 1)
light_energy = 0.3 light_energy = 0.3
light_cull_mask = 4294967293 light_cull_mask = 4294967293
shadow_enabled = true shadow_enabled = true
shadow_caster_mask = 4294967293
script = ExtResource("3_bkg64")

View File

@ -69,6 +69,7 @@ skeleton = NodePath("../..")
[node name="BeamParticles1" type="GPUParticles3D" parent="Muzzle"] [node name="BeamParticles1" type="GPUParticles3D" parent="Muzzle"]
unique_name_in_owner = true unique_name_in_owner = true
layers = 2
amount = 16 amount = 16
lifetime = 0.5 lifetime = 0.5
local_coords = true local_coords = true
@ -77,6 +78,7 @@ draw_pass_1 = SubResource("QuadMesh_fgb4j")
[node name="BeamParticles2" type="GPUParticles3D" parent="Muzzle"] [node name="BeamParticles2" type="GPUParticles3D" parent="Muzzle"]
unique_name_in_owner = true unique_name_in_owner = true
layers = 2
lifetime = 0.2 lifetime = 0.2
local_coords = true local_coords = true
process_material = SubResource("ParticleProcessMaterial_vwgy4") process_material = SubResource("ParticleProcessMaterial_vwgy4")

View File

@ -165,6 +165,7 @@ cull_mask = 1048573
[node name="BeamParticles1" type="GPUParticles3D" parent="Muzzle/Pivot"] [node name="BeamParticles1" type="GPUParticles3D" parent="Muzzle/Pivot"]
unique_name_in_owner = true unique_name_in_owner = true
layers = 2
amount = 16 amount = 16
lifetime = 0.5 lifetime = 0.5
local_coords = true local_coords = true
@ -173,6 +174,7 @@ draw_pass_1 = SubResource("QuadMesh_trcry")
[node name="BeamParticles2" type="GPUParticles3D" parent="Muzzle/Pivot"] [node name="BeamParticles2" type="GPUParticles3D" parent="Muzzle/Pivot"]
unique_name_in_owner = true unique_name_in_owner = true
layers = 2
lifetime = 0.2 lifetime = 0.2
local_coords = true local_coords = true
process_material = SubResource("ParticleProcessMaterial_lyk2j") process_material = SubResource("ParticleProcessMaterial_lyk2j")