From b80c9037b669f34136fa33be13108250e7ad0cd6 Mon Sep 17 00:00:00 2001 From: Ryan Reed Date: Wed, 5 Mar 2025 15:53:07 -0500 Subject: [PATCH] Adding a (bad) leaves block with transparency --- assets/materials/leaves.tres | 10 +++++++++ assets/textures/leaves.png | Bin 0 -> 478 bytes assets/textures/leaves.png.import | 34 ++++++++++++++++++++++++++++++ data_structure/db_items.gd | 1 + resources/blocks/004_leaves.tres | 12 +++++++++++ 5 files changed, 57 insertions(+) create mode 100644 assets/materials/leaves.tres create mode 100644 assets/textures/leaves.png create mode 100644 assets/textures/leaves.png.import create mode 100644 resources/blocks/004_leaves.tres diff --git a/assets/materials/leaves.tres b/assets/materials/leaves.tres new file mode 100644 index 0000000..669313d --- /dev/null +++ b/assets/materials/leaves.tres @@ -0,0 +1,10 @@ +[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://d15n1p3spu3jg"] + +[ext_resource type="Texture2D" uid="uid://goygbpyqhych" path="res://assets/textures/leaves.png" id="1_sli0o"] + +[resource] +transparency = 1 +albedo_texture = ExtResource("1_sli0o") +metallic_specular = 0.0 +roughness = 0.0 +texture_filter = 0 diff --git a/assets/textures/leaves.png b/assets/textures/leaves.png new file mode 100644 index 0000000000000000000000000000000000000000..47d049a238857429aa7f1c11e00a6fc8cacb4443 GIT binary patch literal 478 zcmV<40U`d0P)Ka;P0?0Eq_Jig)bh@w67cr z>kB$J%XbS*ytfN+CEY~Q*1a{ZMa~A_Jec^GF85&G7L-F_=VtlXhq6w-NBO_m_nkPV z(+L_^((->D4Z6G+BFaL0Os7M>w+sHi5ANTSm21J#hd~6m%~M(e`e&Vg;{IlS0WRhz U#Hkb7AOHXW07*qoM6N<$g5O%zssI20 literal 0 HcmV?d00001 diff --git a/assets/textures/leaves.png.import b/assets/textures/leaves.png.import new file mode 100644 index 0000000..b8279d8 --- /dev/null +++ b/assets/textures/leaves.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://goygbpyqhych" +path="res://.godot/imported/leaves.png-dc5e7d89c7c612161d39a0b5bf60a1ff.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/leaves.png" +dest_files=["res://.godot/imported/leaves.png-dc5e7d89c7c612161d39a0b5bf60a1ff.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=0 diff --git a/data_structure/db_items.gd b/data_structure/db_items.gd index 656f7b1..0f61d3d 100644 --- a/data_structure/db_items.gd +++ b/data_structure/db_items.gd @@ -17,4 +17,5 @@ func _init() -> void: "001": preload("res://resources/blocks/001_dirt.tres"), "002": preload("res://resources/blocks/002_stone.tres"), "003": preload("res://resources/blocks/003_wood.tres"), + "004": preload("res://resources/blocks/004_leaves.tres"), } diff --git a/resources/blocks/004_leaves.tres b/resources/blocks/004_leaves.tres new file mode 100644 index 0000000..9bb8889 --- /dev/null +++ b/resources/blocks/004_leaves.tres @@ -0,0 +1,12 @@ +[gd_resource type="Resource" script_class="BlockResource" load_steps=3 format=3 uid="uid://4knt6o2ohku3"] + +[ext_resource type="Material" uid="uid://d15n1p3spu3jg" path="res://assets/materials/leaves.tres" id="1_dbmit"] +[ext_resource type="Script" uid="uid://dwrmy4mx0mw18" path="res://data_structure/block.gd" id="3_kuops"] + +[resource] +script = ExtResource("3_kuops") +material_east = ExtResource("1_dbmit") +id = "004" +name = "Leaves" +description = "Tree leaves" +metadata/_custom_type_script = "uid://dwrmy4mx0mw18"