Skip to content

Commit

Permalink
Merge pull request #162 from limbonaut/maintenance
Browse files Browse the repository at this point in the history
Project maintenance
  • Loading branch information
mphe authored Jun 21, 2024
2 parents e152ec9 + f8833f8 commit 4d7de90
Show file tree
Hide file tree
Showing 26 changed files with 1,500 additions and 48 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
/addons !export-ignore
/addons/rmsmartshape !export-ignore
/addons/rmsmartshape/** !export-ignore
/examples !export-ignore
/examples/** !export-ignore
/README.md !export-ignore
/LICENSE !export-ignore

This file was deleted.

16 changes: 16 additions & 0 deletions examples/edge_shader/edge_shader.gdshader
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
shader_type canvas_item;
/**
* This shader fixes normal textures looking wrong when used with SmartShape2D.
* See: https://github.com/SirRamEsq/SmartShape2D/blob/master/addons/rmsmartshape/documentation/Normals.md
*/

varying mat2 NORMAL_MATRIX;

void vertex() {
NORMAL_MATRIX = mat2(COLOR.rg, COLOR.ba) * 2.0 - mat2(vec2(1.0), vec2(1.0));
}

void fragment() {
NORMAL.xy = NORMAL_MATRIX * NORMAL.xy;
COLOR = texture(TEXTURE, UV);
}
6 changes: 6 additions & 0 deletions examples/edge_shader/material_edge_shader.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://dpec5hjpflmri"]

[ext_resource type="Shader" path="res://examples/edge_shader/edge_shader.gdshader" id="1_akl0v"]

[resource]
shader = ExtResource("1_akl0v")
22 changes: 22 additions & 0 deletions examples/sharp_corner_tapering/assets/mat_edge_metal.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[gd_resource type="Resource" script_class="SS2D_Material_Edge" load_steps=7 format=3 uid="uid://c8q2nrxnbopbb"]

[ext_resource type="Script" path="res://addons/rmsmartshape/materials/edge_material.gd" id="1_lbfns"]
[ext_resource type="Texture2D" uid="uid://b3aqa3bj1osvp" path="res://examples/sharp_corner_tapering/assets/tex_metal_edge.png" id="2_bmjh3"]
[ext_resource type="Texture2D" uid="uid://bobwi3r6aiiqg" path="res://examples/sharp_corner_tapering/assets/tex_metal_corner_inner.png" id="3_n1i1s"]
[ext_resource type="Texture2D" uid="uid://bc34cuc50as8f" path="res://examples/sharp_corner_tapering/assets/tex_metal_corner_outer.png" id="4_ml2u7"]
[ext_resource type="Texture2D" uid="uid://jc3g5qsmnpdd" path="res://examples/sharp_corner_tapering/assets/tex_metal_taper_corner_left.png" id="5_244mn"]
[ext_resource type="Texture2D" uid="uid://cdnfaf3bslk38" path="res://examples/sharp_corner_tapering/assets/tex_metal_taper_corner_right.png" id="6_1c2na"]

[resource]
script = ExtResource("1_lbfns")
textures = Array[Texture2D]([ExtResource("2_bmjh3")])
textures_corner_outer = Array[Texture2D]([ExtResource("4_ml2u7")])
textures_corner_inner = Array[Texture2D]([ExtResource("3_n1i1s")])
textures_taper_left = Array[Texture2D]([])
textures_taper_right = Array[Texture2D]([])
textures_taper_corner_left = Array[Texture2D]([ExtResource("5_244mn")])
textures_taper_corner_right = Array[Texture2D]([ExtResource("6_1c2na")])
randomize_texture = false
use_corner_texture = true
use_taper_texture = false
fit_mode = 0
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bobwi3r6aiiqg"
path="res://.godot/imported/tex_metal_tiling_corner.png-c4964e5436e9bd8e78dac43ec5706855.ctex"
path="res://.godot/imported/tex_metal_corner_inner.png-cdfd7b81c523bc5bb5c7863d7307007e.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/rmsmartshape/examples/sharp_corner_tapering/gfx/metal_tile/textures/tex_metal_tiling_corner.png"
dest_files=["res://.godot/imported/tex_metal_tiling_corner.png-c4964e5436e9bd8e78dac43ec5706855.ctex"]
source_file="res://examples/sharp_corner_tapering/assets/tex_metal_corner_inner.png"
dest_files=["res://.godot/imported/tex_metal_corner_inner.png-cdfd7b81c523bc5bb5c7863d7307007e.ctex"]

[params]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bc34cuc50as8f"
path="res://.godot/imported/tex_metal_tiling_corner_outer.png-3181412620eed5afff36f70bbfe7f3ed.ctex"
path="res://.godot/imported/tex_metal_corner_outer.png-6ea6aecab21ef2cdfa9c20ae8389ee06.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/rmsmartshape/examples/sharp_corner_tapering/gfx/metal_tile/textures/tex_metal_tiling_corner_outer.png"
dest_files=["res://.godot/imported/tex_metal_tiling_corner_outer.png-3181412620eed5afff36f70bbfe7f3ed.ctex"]
source_file="res://examples/sharp_corner_tapering/assets/tex_metal_corner_outer.png"
dest_files=["res://.godot/imported/tex_metal_corner_outer.png-6ea6aecab21ef2cdfa9c20ae8389ee06.ctex"]

[params]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://b3aqa3bj1osvp"
path="res://.godot/imported/tex_metal_tiling_outline.png-ab71193ffc59be44c448090243b6c921.ctex"
path="res://.godot/imported/tex_metal_edge.png-5aaf6e458197a953a7afeee0e270fea4.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/rmsmartshape/examples/sharp_corner_tapering/gfx/metal_tile/textures/tex_metal_tiling_outline.png"
dest_files=["res://.godot/imported/tex_metal_tiling_outline.png-ab71193ffc59be44c448090243b6c921.ctex"]
source_file="res://examples/sharp_corner_tapering/assets/tex_metal_edge.png"
dest_files=["res://.godot/imported/tex_metal_edge.png-5aaf6e458197a953a7afeee0e270fea4.ctex"]

[params]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bj658oli0klj3"
path="res://.godot/imported/tex_metal_tiling_fill.png-968e36f9c9db74105d19f64fabf90b81.ctex"
path="res://.godot/imported/tex_metal_fill.png-307d5ebcedc9e8c4f154a2c09687cb41.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/rmsmartshape/examples/sharp_corner_tapering/gfx/metal_tile/textures/tex_metal_tiling_fill.png"
dest_files=["res://.godot/imported/tex_metal_tiling_fill.png-968e36f9c9db74105d19f64fabf90b81.ctex"]
source_file="res://examples/sharp_corner_tapering/assets/tex_metal_fill.png"
dest_files=["res://.godot/imported/tex_metal_fill.png-307d5ebcedc9e8c4f154a2c09687cb41.ctex"]

[params]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://jc3g5qsmnpdd"
path="res://.godot/imported/tex_metal_tiling_taper_left.png-b2ad027e151707409097674e4d32a3cc.ctex"
path="res://.godot/imported/tex_metal_taper_corner_left.png-735fbf01b6fc0725b32a91fb24aae5d5.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/rmsmartshape/examples/sharp_corner_tapering/gfx/metal_tile/textures/tex_metal_tiling_taper_left.png"
dest_files=["res://.godot/imported/tex_metal_tiling_taper_left.png-b2ad027e151707409097674e4d32a3cc.ctex"]
source_file="res://examples/sharp_corner_tapering/assets/tex_metal_taper_corner_left.png"
dest_files=["res://.godot/imported/tex_metal_taper_corner_left.png-735fbf01b6fc0725b32a91fb24aae5d5.ctex"]

[params]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cdnfaf3bslk38"
path="res://.godot/imported/tex_metal_tiling_taper_right.png-a4c055f51129d7fec053741dc9380f05.ctex"
path="res://.godot/imported/tex_metal_taper_corner_right.png-75d13fe99bb8e540489390ee64c63ea5.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/rmsmartshape/examples/sharp_corner_tapering/gfx/metal_tile/textures/tex_metal_tiling_taper_right.png"
dest_files=["res://.godot/imported/tex_metal_tiling_taper_right.png-a4c055f51129d7fec053741dc9380f05.ctex"]
source_file="res://examples/sharp_corner_tapering/assets/tex_metal_taper_corner_right.png"
dest_files=["res://.godot/imported/tex_metal_taper_corner_right.png-75d13fe99bb8e540489390ee64c63ea5.ctex"]

[params]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
[ext_resource type="Script" path="res://addons/rmsmartshape/vertex_properties.gd" id="2_yp1d2"]
[ext_resource type="Script" path="res://addons/rmsmartshape/shapes/point.gd" id="3_edpr6"]
[ext_resource type="Script" path="res://addons/rmsmartshape/shapes/point_array.gd" id="4_udfgv"]
[ext_resource type="Texture2D" uid="uid://bj658oli0klj3" path="res://addons/rmsmartshape/examples/sharp_corner_tapering/gfx/metal_tile/textures/tex_metal_tiling_fill.png" id="6_ry0x0"]
[ext_resource type="Texture2D" uid="uid://bj658oli0klj3" path="res://examples/sharp_corner_tapering/assets/tex_metal_fill.png" id="6_ry0x0"]
[ext_resource type="Script" path="res://addons/rmsmartshape/materials/shape_material.gd" id="7_ncdby"]
[ext_resource type="Resource" uid="uid://c8q2nrxnbopbb" path="res://addons/rmsmartshape/examples/sharp_corner_tapering/gfx/metal_tile/metal_tile.tres" id="8_uwntg"]
[ext_resource type="Resource" uid="uid://c8q2nrxnbopbb" path="res://examples/sharp_corner_tapering/assets/mat_edge_metal.tres" id="8_uwntg"]
[ext_resource type="Script" path="res://addons/rmsmartshape/normal_range.gd" id="9_tqu3h"]
[ext_resource type="Script" path="res://addons/rmsmartshape/materials/edge_material.gd" id="10_55l7o"]
[ext_resource type="Script" path="res://addons/rmsmartshape/materials/edge_material_metadata.gd" id="10_umoay"]
[ext_resource type="Texture2D" uid="uid://b3aqa3bj1osvp" path="res://addons/rmsmartshape/examples/sharp_corner_tapering/gfx/metal_tile/textures/tex_metal_tiling_outline.png" id="11_jc4po"]
[ext_resource type="Texture2D" uid="uid://bobwi3r6aiiqg" path="res://addons/rmsmartshape/examples/sharp_corner_tapering/gfx/metal_tile/textures/tex_metal_tiling_corner.png" id="12_va43u"]
[ext_resource type="Texture2D" uid="uid://bc34cuc50as8f" path="res://addons/rmsmartshape/examples/sharp_corner_tapering/gfx/metal_tile/textures/tex_metal_tiling_corner_outer.png" id="13_f7yxr"]
[ext_resource type="Texture2D" uid="uid://b3aqa3bj1osvp" path="res://examples/sharp_corner_tapering/assets/tex_metal_edge.png" id="11_jc4po"]
[ext_resource type="Texture2D" uid="uid://bobwi3r6aiiqg" path="res://examples/sharp_corner_tapering/assets/tex_metal_corner_inner.png" id="12_va43u"]
[ext_resource type="Texture2D" uid="uid://bc34cuc50as8f" path="res://examples/sharp_corner_tapering/assets/tex_metal_corner_outer.png" id="13_f7yxr"]

[sub_resource type="Resource" id="Resource_2r7x3"]
script = ExtResource("2_yp1d2")
Expand Down
Binary file removed ss2d_edge_shader.material
Binary file not shown.
3 changes: 0 additions & 3 deletions test.tscn

This file was deleted.

Binary file added tests/scenes/assets/tex_short_edge_alt.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 tests/scenes/assets/tex_short_edge_alt.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dnsphlyfdp58f"
path="res://.godot/imported/tex_short_edge_alt.png-76eba76e929c894d37f32caa24d62c54.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://tests/scenes/assets/tex_short_edge_alt.png"
dest_files=["res://.godot/imported/tex_short_edge_alt.png-76eba76e929c894d37f32caa24d62c54.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
Loading

0 comments on commit 4d7de90

Please sign in to comment.