forked from 2nafish117/godot-viewmodel-render-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.tscn
116 lines (90 loc) · 3.38 KB
/
Main.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
[gd_scene load_steps=13 format=2]
[ext_resource path="res://FpCamera.tscn" type="PackedScene" id=1]
[ext_resource path="res://Assets/kloppenheim_06_4k.exr" type="Texture" id=2]
[ext_resource path="res://Assets/Textures/texture_08.png" type="Texture" id=3]
[sub_resource type="PanoramaSky" id=1]
panorama = ExtResource( 2 )
[sub_resource type="Environment" id=2]
background_mode = 2
background_sky = SubResource( 1 )
ambient_light_color = Color( 0.176471, 0.176471, 0.176471, 1 )
ambient_light_sky_contribution = 0.0
tonemap_mode = 3
ss_reflections_enabled = true
dof_blur_near_distance = 0.49
dof_blur_near_transition = 0.2
dof_blur_near_amount = 0.11
[sub_resource type="PlaneMesh" id=3]
size = Vector2( 50, 50 )
[sub_resource type="SpatialMaterial" id=4]
flags_world_triplanar = true
albedo_color = Color( 0.329412, 0.329412, 0.329412, 1 )
albedo_texture = ExtResource( 3 )
uv1_triplanar = true
[sub_resource type="SpatialMaterial" id=5]
albedo_color = Color( 0.294118, 0.0313726, 0.0313726, 1 )
[sub_resource type="CubeMesh" id=6]
material = SubResource( 5 )
size = Vector3( 1, 1, 1 )
[sub_resource type="CapsuleMesh" id=7]
[sub_resource type="Shader" id=8]
code = "shader_type spatial;
render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx,depth_test_disable;
uniform vec4 albedo : hint_color;
uniform sampler2D texture_albedo : hint_albedo;
uniform float specular;
uniform float metallic;
uniform float roughness : hint_range(0,1);
uniform float point_size : hint_range(0,128);
uniform vec3 uv1_scale;
uniform vec3 uv1_offset;
uniform vec3 uv2_scale;
uniform vec3 uv2_offset;
void vertex() {
UV=UV*uv1_scale.xy+uv1_offset.xy;
}
void fragment() {
vec2 base_uv = UV;
vec4 albedo_tex = texture(texture_albedo,base_uv);
ALBEDO = albedo.rgb * albedo_tex.rgb;
METALLIC = metallic;
ROUGHNESS = roughness;
SPECULAR = specular;
}
"
[sub_resource type="ShaderMaterial" id=9]
shader = SubResource( 8 )
shader_param/albedo = Color( 1, 1, 1, 1 )
shader_param/specular = 0.5
shader_param/metallic = 0.0
shader_param/roughness = 1.0
shader_param/point_size = 1.0
shader_param/uv1_scale = Vector3( 1, 1, 1 )
shader_param/uv1_offset = Vector3( 0, 0, 0 )
shader_param/uv2_scale = Vector3( 1, 1, 1 )
shader_param/uv2_offset = Vector3( 0, 0, 0 )
[node name="Spatial" type="Spatial"]
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource( 2 )
[node name="DirectionalLight" type="DirectionalLight" parent="."]
transform = Transform( 0.941046, 0.0942121, -0.324894, 0, 0.960435, 0.278505, 0.338278, -0.262086, 0.903813, 0, 1.82786, 0 )
light_energy = 6.0
[node name="FpCamera" parent="." instance=ExtResource( 1 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.8, 0 )
[node name="Camera" parent="FpCamera/H/V" index="0"]
current = true
fov = 90.0
[node name="MeshInstance" type="MeshInstance" parent="."]
mesh = SubResource( 3 )
material/0 = SubResource( 4 )
[node name="MeshInstance2" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.8, 1.661, 0 )
mesh = SubResource( 6 )
[node name="MeshInstance4" type="MeshInstance" parent="."]
transform = Transform( 0.826108, -0.367741, -0.42698, 0, 0.757713, -0.652588, 0.563512, 0.539108, 0.625953, 0, 1.661, -5 )
mesh = SubResource( 6 )
[node name="MeshInstance3" type="MeshInstance" parent="."]
visible = false
mesh = SubResource( 7 )
material/0 = SubResource( 9 )
[editable path="FpCamera"]