new road shaders

This commit is contained in:
Nikolai Fesenko
2025-08-15 23:16:08 +02:00
parent 2e33b8e18e
commit d7a9dc76dc
4 changed files with 39 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
[gd_scene load_steps=13 format=3 uid="uid://bj7y7q2qkpnci"]
[gd_scene load_steps=16 format=3 uid="uid://bj7y7q2qkpnci"]
[ext_resource type="Shader" uid="uid://c5e2qqpg6h4lw" path="res://Shaders/road.gdshader" id="2_6bp64"]
[ext_resource type="ArrayMesh" uid="uid://622ethh2pdfa" path="res://Blends/road/road.obj" id="4_jjvhh"]
[ext_resource type="PackedScene" uid="uid://dqrqq5vg8hek3" path="res://Scenes/Prefabs/Person.tscn" id="5_kry3j"]
[ext_resource type="PackedScene" uid="uid://cyaesj3qjb5um" path="res://Scenes/Prefabs/main_game_ui.tscn" id="6_6bp64"]
@@ -25,6 +26,14 @@ fog_mode = 1
fog_density = 1.0
fog_depth_curve = 4.75681
[sub_resource type="ShaderMaterial" id="ShaderMaterial_6bp64"]
render_priority = 0
shader = ExtResource("2_6bp64")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_344ge"]
render_priority = 0
shader = ExtResource("2_6bp64")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_21xkr"]
lifetime_randomness = 0.55
emission_shape = 3
@@ -51,10 +60,12 @@ shadow_enabled = true
transform = Transform3D(10.951, 0, 0, 0, 1, 0, 0, 0, 1, -54.1402, 0.738562, -56.7411)
mesh = ExtResource("4_jjvhh")
skeleton = NodePath("../Road")
surface_material_override/0 = SubResource("ShaderMaterial_6bp64")
[node name="Road" type="MeshInstance3D" parent="."]
transform = Transform3D(10.9512, 0, 0, 0, 1, 0, 0, 0, 1, -54.4288, 0.584906, -61.8752)
mesh = ExtResource("4_jjvhh")
surface_material_override/0 = SubResource("ShaderMaterial_344ge")
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
transform = Transform3D(3.70763, 0, 0, 0, 2.24982, 0, 0, 0, 3.71542, -7.77808, 10.8809, -60.0289)

17
Shaders/road.gdshader Normal file
View File

@@ -0,0 +1,17 @@
shader_type spatial;
void vertex() {
}
void fragment() {
// Called for every pixel the material is visible on.
ALBEDO = vec3(0.3,0.3,0.3);
METALLIC = 1.0;
ROUGHNESS = 0.5;
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}

View File

@@ -0,0 +1 @@
uid://c5e2qqpg6h4lw

9
Shaders/road.tres Normal file
View File

@@ -0,0 +1,9 @@
[gd_resource type="VisualShader" format=3 uid="uid://b02412t58m7q4"]
[resource]
code = "shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_schlick_ggx;
"