Skip to content

Commit

Permalink
cleaned up files
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsKorin authored Mar 18, 2024
1 parent afcdef9 commit 307b6f0
Show file tree
Hide file tree
Showing 29 changed files with 522 additions and 198 deletions.
Binary file added addons/post_processing/assets/ascii.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions addons/post_processing/assets/ascii.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://5rj5tlylm7bt"
path="res://.godot/imported/ascii.png-152231094f5e4e2669cec888e3c259a5.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/post_processing/assets/ascii.png"
dest_files=["res://.godot/imported/ascii.png-152231094f5e4e2669cec888e3c259a5.ctex"]

[params]

compress/mode=0
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/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=1
Binary file added addons/post_processing/assets/lens_aura.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions addons/post_processing/assets/lens_aura.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://3ee7ii2w44gd"
path="res://.godot/imported/lens_aura.png-e27f19e14a0272728e7b44bd21dd8800.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/post_processing/assets/lens_aura.png"
dest_files=["res://.godot/imported/lens_aura.png-e27f19e14a0272728e7b44bd21dd8800.ctex"]

[params]

compress/mode=0
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/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=1
Binary file added addons/post_processing/assets/lens_divine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions addons/post_processing/assets/lens_divine.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dhlg318yf5dvo"
path="res://.godot/imported/lens_divine.png-f89592ebc844543be1487a3ee051ee93.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/post_processing/assets/lens_divine.png"
dest_files=["res://.godot/imported/lens_divine.png-f89592ebc844543be1487a3ee051ee93.ctex"]

[params]

compress/mode=0
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/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=1
35 changes: 35 additions & 0 deletions addons/post_processing/assets/lens_flare.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
extends CanvasLayer

# In your main scene script

var camera = null
var light_source = null
var light_pos_world = null
var screen_pos = null
var light_pos_screen = null
var material = null

func _ready():
# Get camera node automatically based on type
camera = get_tree().get_root().find_child("Camera3D", true, true) # Searches entire scene tree
if not camera:
print("Warning: No Camera node found in scene!")
return

# Get first light node (adjust if you need a specific light)
light_source = get_tree().get_root().find_child("Light3D", true, true) # Searches entire scene tree
if not light_source:
print("Warning: No Light node found in scene!")
return

func _physics_process(delta):
if not camera or not light_source:
return # Skip if camera or light not found

# Calculate and set light position as before
light_pos_world = light_source.global_transform.origin
screen_pos = camera.project_world_ray(light_pos_world)
light_pos_screen = screen_pos / screen_pos.w

material = $data.material
material.set_uniform("LightPositionWorldSpace", light_pos_screen)
21 changes: 0 additions & 21 deletions addons/post_processing/node/children/Bloom.tscn

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[sub_resource type="ShaderMaterial" id="ShaderMaterial_ke5y5"]
shader = ExtResource("1_qxjen")
shader_parameter/offset = 1.0
shader_parameter/offset = 5.23

[node name="ChromaticAberration" type="CanvasLayer"]
layer = 102
Expand All @@ -16,3 +16,4 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
1 change: 1 addition & 0 deletions addons/post_processing/node/children/analog_monitor.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
24 changes: 24 additions & 0 deletions addons/post_processing/node/children/ascii.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[gd_scene load_steps=4 format=3 uid="uid://k8tnsut5pohj"]

[ext_resource type="Shader" path="res://addons/post_processing/shaders/ascii.gdshader" id="1_bp3vh"]
[ext_resource type="Texture2D" uid="uid://5rj5tlylm7bt" path="res://addons/post_processing/assets/ascii.png" id="2_qs7p5"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_ppj3i"]
shader = ExtResource("1_bp3vh")
shader_parameter/ascii_size = Vector2(5, 10)
shader_parameter/available_columns = 10
shader_parameter/max_columns = 16
shader_parameter/ascii_tex = ExtResource("2_qs7p5")

[node name="Ascii" type="CanvasLayer"]
layer = 99
visible = false

[node name="data" type="ColorRect" parent="."]
material = SubResource("ShaderMaterial_ppj3i")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
38 changes: 38 additions & 0 deletions addons/post_processing/node/children/bloom.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[gd_scene load_steps=3 format=3 uid="uid://dvpfe511myfg5"]

[ext_resource type="Shader" path="res://addons/post_processing/shaders/bloom.gdshader" id="1_qyxdw"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_qv2yl"]
shader = ExtResource("1_qyxdw")
shader_parameter/BlurAmount = null
shader_parameter/FlareThreshold = null
shader_parameter/Flares = null
shader_parameter/FlareSpacing = null
shader_parameter/Intensity = null
shader_parameter/Saturation_ = null
shader_parameter/FalloffStart = null
shader_parameter/FalloffEnd = null

[node name="Bloom" type="CanvasLayer"]

[node name="SubViewportContainer" type="SubViewportContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
stretch = true

[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"]
handle_input_locally = false
size = Vector2i(1152, 648)
render_target_update_mode = 4

[node name="TextureRect" type="ColorRect" parent="."]
z_index = 105
material = SubResource("ShaderMaterial_qv2yl")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
4 changes: 3 additions & 1 deletion addons/post_processing/node/children/blur.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

[sub_resource type="ShaderMaterial" id="ShaderMaterial_efbmf"]
shader = ExtResource("1_6v1pv")
shader_parameter/lod = 1.0
shader_parameter/lod = 4.615

[node name="Blur" type="CanvasLayer"]
layer = 101
visible = false

[node name="data" type="ColorRect" parent="."]
material = SubResource("ShaderMaterial_efbmf")
Expand All @@ -16,3 +17,4 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
1 change: 1 addition & 0 deletions addons/post_processing/node/children/circular_waves.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
9 changes: 8 additions & 1 deletion addons/post_processing/node/children/fish_eye.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@

[sub_resource type="ShaderMaterial" id="ShaderMaterial_v56sw"]
shader = ExtResource("1_eks6e")
shader_parameter/effect_amount = 0.0
shader_parameter/aspect = 1.0
shader_parameter/distortion = 1.0
shader_parameter/radius = 1.0
shader_parameter/alpha = 1.0
shader_parameter/crop = 1.0
shader_parameter/crop_color = Color(0, 0, 0, 1)

[node name="FishEye" type="CanvasLayer"]
layer = 103
visible = false

[node name="data" type="ColorRect" parent="."]
material = SubResource("ShaderMaterial_v56sw")
Expand All @@ -16,3 +22,4 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
2 changes: 2 additions & 0 deletions addons/post_processing/node/children/glitch.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ shader_parameter/colorOffsetIntensity = 1.3

[node name="Glitch" type="CanvasLayer"]
layer = 104
visible = false

[node name="data" type="ColorRect" parent="."]
material = SubResource("ShaderMaterial_gdr74")
Expand All @@ -20,3 +21,4 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
3 changes: 2 additions & 1 deletion addons/post_processing/node/children/grain.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
[ext_resource type="Shader" path="res://addons/post_processing/shaders/grain.gdshader" id="1_wos36"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_wb4vw"]
render_priority = 0
shader = ExtResource("1_wos36")
shader_parameter/strength = 75.0

[node name="Grain" type="CanvasLayer"]
visible = false
Expand All @@ -16,3 +16,4 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
2 changes: 2 additions & 0 deletions addons/post_processing/node/children/outline.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ shader_parameter/threshold = 0.0
shader_parameter/blend = 0.1

[node name="Outline" type="CanvasLayer"]
visible = false

[node name="data" type="ColorRect" parent="."]
material = SubResource("ShaderMaterial_yuki3")
Expand All @@ -17,3 +18,4 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
1 change: 1 addition & 0 deletions addons/post_processing/node/children/screen_shake.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
1 change: 1 addition & 0 deletions addons/post_processing/node/children/speed_lines.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
2 changes: 2 additions & 0 deletions addons/post_processing/node/children/vignette.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ shader_parameter/vignette_opacity = 1.0
shader_parameter/vignette_rgb = Color(0, 0, 0, 1)

[node name="Vignette" type="CanvasLayer"]
visible = false

[node name="data" type="ColorRect" parent="."]
material = SubResource("ShaderMaterial_jiuwk")
Expand All @@ -17,3 +18,4 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
Loading

0 comments on commit 307b6f0

Please sign in to comment.