From: Clifton Palmer Date: Mon, 15 Nov 2021 04:00:30 +0000 (-0600) Subject: Added materials X-Git-Url: http://git.purplebirdman.com/star-foxy.git/commitdiff_plain/e7616f461c04109c4175e6f31ce6b8f96b93ba36 Added materials --- diff --git a/main.tscn b/main.tscn index f7f4093..9073731 100644 --- a/main.tscn +++ b/main.tscn @@ -1,6 +1,45 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=6 format=2] [ext_resource path="res://player/player.tscn" type="PackedScene" id=1] +[ext_resource path="res://obstacle.tres" type="Material" id=2] + +[sub_resource type="VisualShaderNodeColorConstant" id=1] +constant = Color( 0.00150203, 0.503906, 0.0800027, 1 ) + +[sub_resource type="VisualShader" id=2] +code = "shader_type spatial; +render_mode specular_schlick_ggx; + + + + +void vertex() { +// Output:0 + +} + +void fragment() { +// Color:2 + vec3 n_out2p0 = vec3(0.001502, 0.503906, 0.080003); + float n_out2p1 = 1.000000; + +// Output:0 + ALBEDO = n_out2p0; + +} + +void light() { +// Output:0 + +} +" +graph_offset = Vector2( -479.705, 4.5 ) +nodes/fragment/2/node = SubResource( 1 ) +nodes/fragment/2/position = Vector2( 20, 160 ) +nodes/fragment/connections = PoolIntArray( 2, 0, 0, 0 ) + +[sub_resource type="ShaderMaterial" id=3] +shader = SubResource( 2 ) [node name="world" type="Spatial"] @@ -8,15 +47,19 @@ [node name="CSGBox" type="CSGBox" parent="boxes"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 8 ) +material_override = ExtResource( 2 ) [node name="CSGBox2" type="CSGBox" parent="boxes"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 10.6742, 0, 0 ) +material_override = ExtResource( 2 ) [node name="CSGBox3" type="CSGBox" parent="boxes"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -11.353, 0, 0 ) +material_override = ExtResource( 2 ) -[node name="CSGBox4" type="CSGBox" parent="boxes"] +[node name="floor" type="CSGBox" parent="boxes"] transform = Transform( 111, 0, 0, 0, 1, 0, 0, 0, 111, 0, -11, 0 ) +material_override = SubResource( 3 ) [node name="arwing" parent="." instance=ExtResource( 1 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0547695, 0, 35.9027 ) diff --git a/obstacle.tres b/obstacle.tres new file mode 100644 index 0000000..4fd1c69 --- /dev/null +++ b/obstacle.tres @@ -0,0 +1,4 @@ +[gd_resource type="SpatialMaterial" format=2] + +[resource] +albedo_color = Color( 0.776471, 0.160784, 0.827451, 1 ) diff --git a/player/bullet.tscn b/player/bullet.tscn index 2a8ef2f..31b3558 100644 --- a/player/bullet.tscn +++ b/player/bullet.tscn @@ -54,6 +54,6 @@ script = ExtResource( 1 ) shape = SubResource( 1 ) [node name="CSGSphere" type="CSGSphere" parent="."] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 11, 0, 0, 0 ) +transform = Transform( 2, 0, 0, 0, 2, 0, 0, 0, 16, 0, 0, 0 ) material_override = SubResource( 4 ) radius = 0.1