custom-material.tscn 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. [gd_scene load_steps=6 format=2]
  2. [ext_resource path="res://assets/spineboy/spineboy-data-res.tres" type="SpineSkeletonDataResource" id=1]
  3. [sub_resource type="Shader" id=1]
  4. code = "shader_type canvas_item;
  5. void fragment() {
  6. COLOR = texture(TEXTURE, UV);
  7. COLOR.r = 0.0;
  8. }"
  9. [sub_resource type="ShaderMaterial" id=2]
  10. shader = SubResource( 1 )
  11. [sub_resource type="Shader" id=3]
  12. code = "shader_type canvas_item;
  13. void fragment() {
  14. COLOR = texture(TEXTURE, UV);
  15. COLOR.b = 0.0;
  16. }"
  17. [sub_resource type="ShaderMaterial" id=4]
  18. shader = SubResource( 3 )
  19. [node name="Node2D" type="Node2D"]
  20. [node name="SpineSprite" type="SpineSprite" parent="."]
  21. position = Vector2( 501, 507 )
  22. scale = Vector2( 0.546374, 0.546373 )
  23. skeleton_data_res = ExtResource( 1 )
  24. normal_material = SubResource( 2 )
  25. preview_skin = "Default"
  26. preview_animation = "-- Empty --"
  27. preview_frame = false
  28. preview_time = 0.0
  29. [node name="GunSlot" type="SpineSlotNode" parent="SpineSprite"]
  30. show_behind_parent = true
  31. position = Vector2( 40.8753, -276.036 )
  32. rotation = 0.837234
  33. scale = Vector2( 1, 1 )
  34. slot_name = "gun"
  35. normal_material = SubResource( 4 )