From ca8bdf9ce28ab9429bac3c0d4c4c21a2126cd6e5 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 3 Dec 2019 15:22:45 +0100 Subject: [PATCH] Now the characters and terrarin use the same material, and shader. --- game/data/materials/1_standard_material.tres | 7 ++ game/data/materials/Character.material | Bin 742 -> 746 bytes game/data/materials/world_material.tres | 20 ++---- game/data/models/armature_model_orig_v2.tscn | 66 +++++++++--------- game/data/shaders/1_charactershader.tres | 20 ------ game/data/shaders/1_standard_shader.tres | 15 ++++ .../2_main_lib_merger_empty.tres | 24 +------ game/data/voxel_textures/test.png.import | 34 +++++++++ game/dev/character_dev_mat.tres | 3 +- game/player/CharacterSkeletonGD.gd | 7 +- game/player/Player.tscn | 1 - 11 files changed, 103 insertions(+), 94 deletions(-) create mode 100644 game/data/materials/1_standard_material.tres delete mode 100644 game/data/shaders/1_charactershader.tres create mode 100644 game/data/shaders/1_standard_shader.tres create mode 100644 game/data/voxel_textures/test.png.import diff --git a/game/data/materials/1_standard_material.tres b/game/data/materials/1_standard_material.tres new file mode 100644 index 00000000..4332aceb --- /dev/null +++ b/game/data/materials/1_standard_material.tres @@ -0,0 +1,7 @@ +[gd_resource type="ShaderMaterial" load_steps=2 format=2] + +[ext_resource path="res://data/shaders/1_standard_shader.tres" type="Shader" id=1] + +[resource] +shader = ExtResource( 1 ) +shader_param/albedo = Color( 1, 1, 1, 1 ) diff --git a/game/data/materials/Character.material b/game/data/materials/Character.material index 273f64bcf6bcb037451d427cf5f992db8ef358a5..6b7eed2d1df76bf87933911664554fc2e686cad2 100644 GIT binary patch literal 746 zcmV1^@uk0ssIgwJ-f(kOf5+04618BjB1g0YV!s&5_+} zEHz4zb29kIAj?n$&{$?DqP##a(2L>+SO8l9TmT(G&8dy{YD>kLK8KYNY9PyqmGZRl ze!3a?<+frd-Sa=<%o$a0^!-n`OSgq>qgrK8SEYOn*QbjWY~^x6r*!QES@-|Nf0Mgx ztDPt=TW3`H{}AwB;15uGp2ieQxf!|TLI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Material - mat.albedo_texture = tex +# var mat : SpatialMaterial = _material as SpatialMaterial +# mat.albedo_texture = tex + var mat : ShaderMaterial = _material as ShaderMaterial + mat.set_shader_param("texture_albedo", tex) +# mat.albedo_texture = tex _texture = tex diff --git a/game/player/Player.tscn b/game/player/Player.tscn index 3eb3dc17..63bb8652 100644 --- a/game/player/Player.tscn +++ b/game/player/Player.tscn @@ -46,7 +46,6 @@ transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 0, 0, 0 [node name="Model" type="Spatial" parent="Rotation_Helper"] [node name="character" parent="Rotation_Helper/Model" instance=ExtResource( 1 )] -refresh_in_editor = false [node name="GUILayer" parent="." instance=ExtResource( 3 )] [connection signal="onc_open_loot_winow_request" from="." to="GUILayer" method="_on_Player_onc_open_loot_winow_request"]