Skip to content

Commit

Permalink
Fix normal map direction in 2D Lights and Shadows (#1123)
Browse files Browse the repository at this point in the history
- Group Light2D nodes for easier dragging in the editor.
  • Loading branch information
Calinou authored Oct 18, 2024
1 parent a87fded commit edccce8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion 2d/lights_and_shadows/godot_normal.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/normal_map_invert_y=true
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
Expand Down
7 changes: 5 additions & 2 deletions 2d/lights_and_shadows/light_shadows.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ shadow_enabled = true
shadow_filter = 1
shadow_filter_smooth = 1.2
texture = ExtResource("3")
metadata/_edit_group_ = true

[node name="Blob" type="Sprite2D" parent="RedLight"]
material = SubResource("2")
Expand All @@ -338,8 +339,9 @@ shadow_enabled = true
shadow_filter = 1
shadow_filter_smooth = 1.2
texture = ExtResource("3")
metadata/_edit_group_ = true

[node name="blob" type="Sprite2D" parent="GreenLight"]
[node name="Blob" type="Sprite2D" parent="GreenLight"]
material = SubResource("5")
texture = ExtResource("4")

Expand All @@ -356,8 +358,9 @@ shadow_enabled = true
shadow_filter = 1
shadow_filter_smooth = 1.2
texture = ExtResource("3")
metadata/_edit_group_ = true

[node name="blob" type="Sprite2D" parent="BlueLight"]
[node name="Blob" type="Sprite2D" parent="BlueLight"]
material = SubResource("6")
texture = ExtResource("4")

Expand Down
10 changes: 5 additions & 5 deletions 2d/lights_and_shadows/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ config/description="Simple demo of 2D lights and shadows,
using PointLight2D and LightOccluder2D."
config/tags=PackedStringArray("2d", "demo", "official", "rendering")
run/main_scene="res://light_shadows.tscn"
config/features=PackedStringArray("4.2")
config/features=PackedStringArray("4.3")
config/icon="res://icon.webp"

[debug]
Expand All @@ -32,22 +32,22 @@ window/stretch/aspect="expand"

toggle_directional_light={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
toggle_point_lights={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":80,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":80,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
cycle_directional_light_shadows_quality={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
cycle_point_light_shadows_quality={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":72,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":72,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}

Expand Down

0 comments on commit edccce8

Please sign in to comment.