Premier commit

This commit is contained in:
2026-09-01 22:41:37 +02:00
commit 7cff988739
133 changed files with 6412 additions and 0 deletions
@@ -0,0 +1,61 @@
shader_type spatial;
render_mode unshaded, depth_draw_never, cull_disabled;
uniform float width = 15.0;
uniform float height = 15.0;
uniform float density = 5.0;
uniform float line_thickness = 0.1;
uniform vec4 line_color : source_color = vec4( 0.2, 1.0, 1.0, 1.0 );
uniform sampler2D depth_texture : source_color, hint_depth_texture;
uniform vec4 color1: source_color = vec4(1,1,1,.1);
uniform vec4 color2: source_color = vec4(1,1,1,1);
uniform float threshold = .2;
uniform float fresnel_sharpness = 1.0;
uniform float fresnel_factor = 1.0;
float hex_cells( vec2 uv )
{
float x = uv.x * width * density;
float y = mod( floor(x), 2.0 ) * 0.5 + ( uv.y * height ) * density;
vec2 base_chip = abs( vec2( 0.5 ) - mod( vec2( x, y ), 1.0 ) );
return abs( max( base_chip.x * 1.5 + base_chip.y, base_chip.y * 2.0 ) - 1.0 );
}
void fragment( )
{
float depth = texture(depth_texture, SCREEN_UV).x;
//vec3 ndc = vec3(SCREEN_UV, depth) * 2.0 - 1.0;
vec3 ndc = vec3(SCREEN_UV * 2.0 - 1.0, depth);
vec4 view = INV_PROJECTION_MATRIX * vec4(ndc, 1.0);
view.xyz /= view.w;
float linear_depth = -view.z;
float object_depth = FRAGCOORD.z;
//vec3 object_ndc = vec3(SCREEN_UV, object_depth) * 2.0 - 1.0;
vec3 object_ndc = vec3(SCREEN_UV * 2.0 - 1.0, object_depth);
vec4 object_view = INV_PROJECTION_MATRIX * vec4(object_ndc, 1.0);
object_view.xyz /= object_view.w;
float linear_object_depth = -object_view.z;
float fresnel = pow(1.0 - dot(VIEW, NORMAL), fresnel_sharpness) * fresnel_factor;
if (linear_depth - linear_object_depth > threshold) {
float hex = hex_cells( UV );
vec4 final_color = mix(
color1,
line_color,
float( hex < line_thickness )
);
ALBEDO = final_color.rgb;
ALPHA = final_color.a+(fresnel);
}
else {
ALBEDO = color2.rgb;
ALPHA = color2.a+fresnel;
}
}
@@ -0,0 +1 @@
uid://bdveg7wa4kl6y
+35
View File
@@ -0,0 +1,35 @@
shader_type spatial;
render_mode unshaded;
uniform sampler2D sky_texture : source_color;
uniform bool lock_aspect = false;
uniform float aspect_ratio = 1.3333333;
uniform vec2 fov = vec2(180.0, 90.0);
uniform ivec2 tiling = ivec2(1, 1);
uniform vec2 offset = vec2(0.0, 0.0);
// XY offset, ZW tiling
varying vec4 bg_coords;
void vertex() {
// Camera YX rotation per Basis.get_euler source code
float y = atan(VIEW_MATRIX[0][2], VIEW_MATRIX[2][2]);
float x = asin(VIEW_MATRIX[1][2]);
// Map rotation to screen space
bg_coords.xy = vec2(y * -0.5, x) / PI;
bg_coords.y += 0.5;
bg_coords.w = fov.y / 180.0;
bg_coords.z = !lock_aspect ? fov.x / 360.0 : VIEWPORT_SIZE.x / (VIEWPORT_SIZE.y * aspect_ratio) * bg_coords.w;
// Keep background centered vertically when FOV changes
bg_coords.y *= bg_coords.w > 1.0 ? 0.0 : 1.0 - bg_coords.w;
}
void fragment() {
vec2 uv_offset = vec2(-offset.x, offset.y);
vec2 uv = (SCREEN_UV + uv_offset) * bg_coords.zw + bg_coords.xy;
uv *= vec2(tiling);
ALBEDO = texture(sky_texture, uv).rgb;
}
@@ -0,0 +1 @@
uid://dm5226jwt11ae
+13
View File
@@ -0,0 +1,13 @@
@tool
extends Node3D
class_name Dome
@export var size : float = 100. : set = set_size
func _ready():
set_size(size)
func set_size(s : float):
size = s
if is_node_ready():
scale = Vector3.ONE * size
+1
View File
@@ -0,0 +1 @@
uid://jus6nhwewgay
+164
View File
@@ -0,0 +1,164 @@
[gd_scene format=3 uid="uid://nlli5ju37ghy"]
[ext_resource type="Script" uid="uid://jus6nhwewgay" path="res://objects/dome/dome.gd" id="1_jb5pf"]
[ext_resource type="Shader" uid="uid://bdveg7wa4kl6y" path="res://objects/dome/assets/shader/barrier.gdshader" id="3_jb5pf"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_nbcly"]
shading_mode = 0
albedo_color = Color(0.22352941, 0.03529412, 0.2784314, 1)
[sub_resource type="PlaneMesh" id="PlaneMesh_g4v7s"]
material = SubResource("StandardMaterial3D_nbcly")
size = Vector2(50, 50)
[sub_resource type="SphereMesh" id="SphereMesh_omx8k"]
flip_faces = true
[sub_resource type="ShaderMaterial" id="ShaderMaterial_nbcly"]
render_priority = 0
shader = ExtResource("3_jb5pf")
shader_parameter/width = 15.0
shader_parameter/height = 15.0
shader_parameter/density = 15.0
shader_parameter/line_thickness = 0.1
shader_parameter/line_color = Color(0.19999999, 1, 1, 0)
shader_parameter/color1 = Color(0.55, 0.71500003, 1, 0)
shader_parameter/color2 = Color(0.5529412, 0.7176471, 1, 1)
shader_parameter/threshold = 10.0
shader_parameter/fresnel_sharpness = 1.0
shader_parameter/fresnel_factor = 0.1
[sub_resource type="BoxShape3D" id="BoxShape3D_omx8k"]
size = Vector3(0.1, 0.1, 0.1)
[node name="Dome" type="StaticBody3D" unique_id=166719047]
transform = Transform3D(100, 0, 0, 0, 100, 0, 0, 0, 100, 0, 0, 0)
script = ExtResource("1_jb5pf")
[node name="Ground" type="MeshInstance3D" parent="." unique_id=196721357]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.001, 0)
mesh = SubResource("PlaneMesh_g4v7s")
[node name="DomeMesh2" type="MeshInstance3D" parent="." unique_id=1320849271]
mesh = SubResource("SphereMesh_omx8k")
surface_material_override/0 = SubResource("ShaderMaterial_nbcly")
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1870476723]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5479279, 0, 0)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D2" type="CollisionShape3D" parent="." unique_id=1405453928]
transform = Transform3D(0.9781476, 0, -0.2079117, 0, 1, 0, 0.2079117, 0, 0.9781476, -0.5359544, 0, -0.11392062)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D3" type="CollisionShape3D" parent="." unique_id=1799414955]
transform = Transform3D(0.9135454, 0, -0.40673664, 0, 1, 0, 0.40673664, 0, 0.9135454, -0.50055707, 0, -0.22286236)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D4" type="CollisionShape3D" parent="." unique_id=1057204615]
transform = Transform3D(0.809017, 0, -0.58778524, 0, 1, 0, 0.58778524, 0, 0.809017, -0.443283, 0, -0.32206395)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D5" type="CollisionShape3D" parent="." unique_id=995851263]
transform = Transform3D(0.6809604, 0, -0.7323202, 0, 1, 0, 0.7323202, 0, 0.6809604, -0.3731172, 0, -0.40125868)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D6" type="CollisionShape3D" parent="." unique_id=1389588031]
transform = Transform3D(0.51382184, 0, -0.8578968, 0, 1, 0, 0.8578968, 0, 0.51382184, -0.28153732, 0, -0.4700656)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D7" type="CollisionShape3D" parent="." unique_id=763833944]
transform = Transform3D(0.3242268, 0, -0.94597936, 0, 1, 0, 0.94597936, 0, 0.3242268, -0.17765291, 0, -0.5183285)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D8" type="CollisionShape3D" parent="." unique_id=1992446162]
transform = Transform3D(0.12046155, 0, -0.992718, 0, 1, 0, 0.992718, 0, 0.12046155, -0.06600425, 0, -0.5439379)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D9" type="CollisionShape3D" parent="." unique_id=1208280596]
transform = Transform3D(-0.078486145, 0, -0.9969152, 0, 1, 0, 0.9969152, 0, -0.078486145, 0.04300475, 0, -0.5462377)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D10" type="CollisionShape3D" parent="." unique_id=1292859181]
transform = Transform3D(-0.28404135, 0, -0.958812, 0, 1, 0, 0.958812, 0, -0.28404135, 0.15563418, 0, -0.52535987)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D11" type="CollisionShape3D" parent="." unique_id=1997335297]
transform = Transform3D(-0.47718263, 0, -0.87880415, 0, 1, 0, 0.87880415, 0, -0.47718263, 0.26146168, 0, -0.48152134)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D12" type="CollisionShape3D" parent="." unique_id=1449774908]
transform = Transform3D(-0.6494687, 0, -0.7603884, 0, 1, 0, 0.7603884, 0, -0.6494687, 0.35586205, 0, -0.41663802)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D13" type="CollisionShape3D" parent="." unique_id=357259572]
transform = Transform3D(-0.7835071, 0, -0.62138283, 0, 1, 0, 0.62138283, 0, -0.7835071, 0.4293054, 0, -0.340473)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D14" type="CollisionShape3D" parent="." unique_id=1998926365]
transform = Transform3D(-0.89557827, 0, -0.44490382, 0, 1, 0, 0.44490382, 0, -0.89557827, 0.49071234, 0, -0.24377522)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D15" type="CollisionShape3D" parent="." unique_id=1826517219]
transform = Transform3D(-0.96850854, 0, -0.24898036, 0, 1, 0, 0.24898036, 0, -0.96850854, 0.53067285, 0, -0.13642329)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D16" type="CollisionShape3D" parent="." unique_id=228392577]
transform = Transform3D(-0.99999726, 0, -0.0023402646, 0, 1, 0, 0.0023402646, 0, -0.99999726, 0.5421262, 0, -0.027382933)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D17" type="CollisionShape3D" parent="." unique_id=1106193142]
transform = Transform3D(-0.9779057, 0, 0.20904641, 0, 1, 0, -0.20904641, 0, -0.9779057, 0.5300216, 0, 0.08844173)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D18" type="CollisionShape3D" parent="." unique_id=933370103]
transform = Transform3D(-0.913073, 0, 0.40779632, 0, 1, 0, -0.40779632, 0, -0.913073, 0.49449795, 0, 0.19734235)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D19" type="CollisionShape3D" parent="." unique_id=310765754]
transform = Transform3D(-0.8083345, 0, 0.5887234, 0, 1, 0, -0.5887234, 0, -0.8083345, 0.4371088, 0, 0.29647735)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D20" type="CollisionShape3D" parent="." unique_id=1224640466]
transform = Transform3D(-0.68011034, 0, 0.7331097, 0, 1, 0, -0.7331097, 0, -0.68011034, 0.36685118, 0, 0.37559065)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D21" type="CollisionShape3D" parent="." unique_id=394476411]
transform = Transform3D(-0.5128261, 0, 0.8584924, 0, 1, 0, -0.8584924, 0, -0.5128261, 0.2751915, 0, 0.4442913)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D22" type="CollisionShape3D" parent="." unique_id=1040373752]
transform = Transform3D(-0.32312903, 0, 0.94635487, 0, 1, 0, -0.94635487, 0, -0.32312903, 0.17125116, 0, 0.4924336)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D23" type="CollisionShape3D" parent="." unique_id=1667715263]
transform = Transform3D(-0.11930971, 0, 0.99285704, 0, 1, 0, -0.99285704, 0, -0.11930971, 0.059572875, 0, 0.51791346)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D24" type="CollisionShape3D" parent="." unique_id=733623695]
transform = Transform3D(0.07964271, 0, 0.99682343, 0, 1, 0, -0.99682343, 0, 0.07964271, -0.04943871, 0, 0.52008677)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D25" type="CollisionShape3D" parent="." unique_id=640657227]
transform = Transform3D(0.2851536, 0, 0.95848185, 0, 1, 0, -0.95848185, 0, 0.2851536, -0.16204387, 0, 0.49907833)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D26" type="CollisionShape3D" parent="." unique_id=709442725]
transform = Transform3D(0.47820193, 0, 0.8782499, 0, 1, 0, -0.8782499, 0, 0.47820193, -0.26782042, 0, 0.455117)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D27" type="CollisionShape3D" parent="." unique_id=862417486]
transform = Transform3D(0.6503505, 0, 0.7596344, 0, 1, 0, -0.7596344, 0, 0.6503505, -0.36214545, 0, 0.39012423)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D28" type="CollisionShape3D" parent="." unique_id=677375892]
transform = Transform3D(0.7842275, 0, 0.6204733, 0, 1, 0, -0.6204733, 0, 0.7842275, -0.43550038, 0, 0.313874)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D29" type="CollisionShape3D" parent="." unique_id=1813352688]
transform = Transform3D(0.8960939, 0, 0.4438645, 0, 1, 0, -0.4438645, 0, 0.8960939, -0.49679512, 0, 0.2171051)
shape = SubResource("BoxShape3D_omx8k")
[node name="CollisionShape3D30" type="CollisionShape3D" parent="." unique_id=1653439158]
transform = Transform3D(0.96879673, 0, 0.24785648, 0, 1, 0, -0.24785648, 0, 0.96879673, -0.53663105, 0, 0.10970685)
shape = SubResource("BoxShape3D_omx8k")