Compare commits
2 commits
5d92732c6f
...
af14ac6fee
| Author | SHA1 | Date | |
|---|---|---|---|
| af14ac6fee | |||
| ec6c4a774d |
3 changed files with 34 additions and 5 deletions
21
world/earth.gdshader
Normal file
21
world/earth.gdshader
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
shader_type canvas_item;
|
||||||
|
|
||||||
|
varying vec2 world_position;
|
||||||
|
uniform vec4 color : source_color;
|
||||||
|
|
||||||
|
void vertex() {
|
||||||
|
world_position = (MODEL_MATRIX * vec4(VERTEX, 0.0, 1.0)).xy;
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment() {
|
||||||
|
if(length(world_position) <= 3000.) {
|
||||||
|
COLOR = color;
|
||||||
|
} else {
|
||||||
|
discard;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//void light() {
|
||||||
|
// // Called for every pixel for every light affecting the CanvasItem.
|
||||||
|
// // Uncomment to replace the default light processing function with this one.
|
||||||
|
//}
|
||||||
1
world/earth.gdshader.uid
Normal file
1
world/earth.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://ptqflyxta2qd
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
[gd_scene load_steps=11 format=3 uid="uid://jjoyj1ldafkf"]
|
[gd_scene load_steps=13 format=3 uid="uid://jjoyj1ldafkf"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://vgxh2xdevat7" path="res://world/earth.gd" id="1_wxnww"]
|
[ext_resource type="Script" uid="uid://vgxh2xdevat7" path="res://world/earth.gd" id="1_wxnww"]
|
||||||
[ext_resource type="Script" uid="uid://b5fhsy1xlreco" path="res://world/draw_circle.gd" id="2_2bhor"]
|
|
||||||
[ext_resource type="Script" uid="uid://m3vyyfk8gnma" path="res://world/grid.gd" id="3_2bhor"]
|
[ext_resource type="Script" uid="uid://m3vyyfk8gnma" path="res://world/grid.gd" id="3_2bhor"]
|
||||||
|
[ext_resource type="Shader" uid="uid://ptqflyxta2qd" path="res://world/earth.gdshader" id="3_640fc"]
|
||||||
[ext_resource type="PackedScene" uid="uid://djawvtdwp423v" path="res://buildings/room_temple.tscn" id="3_nihcy"]
|
[ext_resource type="PackedScene" uid="uid://djawvtdwp423v" path="res://buildings/room_temple.tscn" id="3_nihcy"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cmofmd0vf3hx3" path="res://buildings/room_haunted_house.tscn" id="4_ml5no"]
|
[ext_resource type="PackedScene" uid="uid://cmofmd0vf3hx3" path="res://buildings/room_haunted_house.tscn" id="4_ml5no"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dliwqqmrxldjh" path="res://buildings/room_bear_trap.tscn" id="4_r4pw8"]
|
[ext_resource type="PackedScene" uid="uid://dliwqqmrxldjh" path="res://buildings/room_bear_trap.tscn" id="4_r4pw8"]
|
||||||
|
|
@ -13,6 +13,12 @@
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_5i67w"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_5i67w"]
|
||||||
radius = 3000.0
|
radius = 3000.0
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_abvrx"]
|
||||||
|
shader = ExtResource("3_640fc")
|
||||||
|
shader_parameter/color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[sub_resource type="QuadMesh" id="QuadMesh_ej0af"]
|
||||||
|
|
||||||
[node name="Earth" type="Node2D"]
|
[node name="Earth" type="Node2D"]
|
||||||
script = ExtResource("1_wxnww")
|
script = ExtResource("1_wxnww")
|
||||||
|
|
||||||
|
|
@ -22,9 +28,10 @@ collision_layer = 41
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ground"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ground"]
|
||||||
shape = SubResource("CircleShape2D_5i67w")
|
shape = SubResource("CircleShape2D_5i67w")
|
||||||
|
|
||||||
[node name="GroundVisual" type="Node2D" parent="Ground"]
|
[node name="MeshInstance2D" type="MeshInstance2D" parent="Ground"]
|
||||||
script = ExtResource("2_2bhor")
|
material = SubResource("ShaderMaterial_abvrx")
|
||||||
radius = 3000.0
|
scale = Vector2(6000, 6000)
|
||||||
|
mesh = SubResource("QuadMesh_ej0af")
|
||||||
|
|
||||||
[node name="Grid" type="Node2D" parent="."]
|
[node name="Grid" type="Node2D" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue