forked from Ceisri/Reusable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
terrain.tres
170 lines (135 loc) · 4.78 KB
/
terrain.tres
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
[gd_resource type="VisualShader" load_steps=15 format=2]
[ext_resource path="res://ProcedualTerrain/terrain textures/gangryusi_south_grass.png" type="Texture" id=1]
[ext_resource path="res://ProcedualTerrain/terrain textures/su_ghostcity_floor_d.png" type="Texture" id=2]
[sub_resource type="VisualShaderNodeTexture" id=7]
output_port_for_preview = 0
texture = ExtResource( 2 )
[sub_resource type="VisualShaderNodeTexture" id=9]
output_port_for_preview = 0
texture = ExtResource( 1 )
[sub_resource type="VisualShaderNodeVectorScalarMix" id=13]
output_port_for_preview = 0
[sub_resource type="VisualShaderNodeIf" id=14]
output_port_for_preview = 0
default_input_values = [ 0, 0.0, 1, 0.7, 2, 1e-05, 3, Vector3( 0, 0, 0 ), 4, Vector3( 0, 0, 0 ), 5, Vector3( 0, 0, 0 ) ]
[sub_resource type="VisualShaderNodeScalarOp" id=15]
default_input_values = [ 0, 0.0, 1, 0.7 ]
operator = 1
[sub_resource type="VisualShaderNodeScalarOp" id=20]
default_input_values = [ 0, 0.0, 1, 4.0 ]
operator = 2
[sub_resource type="VisualShaderNodeInput" id=3]
input_name = "normal"
[sub_resource type="VisualShaderNodeVec3Constant" id=4]
constant = Vector3( 0, 1, 0 )
[sub_resource type="VisualShaderNodeDotProduct" id=5]
[sub_resource type="VisualShaderNodeIf" id=6]
output_port_for_preview = 0
default_input_values = [ 0, 0.0, 1, 0.95, 2, 0.0, 3, Vector3( 0, 0, 0 ), 4, Vector3( 0, 0, 0 ), 5, Vector3( 0, 0, 0 ) ]
[sub_resource type="VisualShaderNodeInput" id=11]
input_name = "inv_camera"
[sub_resource type="VisualShaderNodeTransformVecMult" id=12]
operator = 1
[resource]
code = "shader_type spatial;
render_mode specular_schlick_ggx, async_visible;
uniform sampler2D tex_frg_15;
uniform sampler2D tex_frg_12;
void vertex() {
// Output:0
}
void fragment() {
// Input:8
mat4 n_out8p0 = INV_CAMERA_MATRIX;
// Input:4
vec3 n_out4p0 = NORMAL;
// TransformVectorMult:9
vec3 n_out9p0 = (vec4(n_out4p0, 1.0) * n_out8p0).xyz;
// Vector:5
vec3 n_out5p0 = vec3(0.000000, 1.000000, 0.000000);
// DotProduct:6
float n_out6p0 = dot(n_out9p0, n_out5p0);
// Texture:15
vec4 tex_frg_15_read = texture(tex_frg_15, UV.xy);
vec3 n_out15p0 = tex_frg_15_read.rgb;
float n_out15p1 = tex_frg_15_read.a;
// Texture:12
vec4 tex_frg_12_read = texture(tex_frg_12, UV.xy);
vec3 n_out12p0 = tex_frg_12_read.rgb;
float n_out12p1 = tex_frg_12_read.a;
// ScalarOp:28
float n_in28p1 = 0.70000;
float n_out28p0 = n_out6p0 - n_in28p1;
// ScalarOp:33
float n_in33p1 = 4.00000;
float n_out33p0 = n_out28p0 * n_in33p1;
// VectorScalarMix:26
vec3 n_out26p0 = mix(n_out12p0, n_out15p0, n_out33p0);
// If:27
float n_in27p1 = 0.70000;
float n_in27p2 = 0.00001;
vec3 n_out27p0;
if(abs(n_out6p0 - n_in27p1) < n_in27p2)
{
n_out27p0 = n_out26p0;
}
else if(n_out6p0 < n_in27p1)
{
n_out27p0 = n_out12p0;
}
else
{
n_out27p0 = n_out26p0;
}
// If:7
float n_in7p1 = 0.95000;
float n_in7p2 = 0.00000;
vec3 n_in7p3 = vec3(0.00000, 0.00000, 0.00000);
vec3 n_out7p0;
if(abs(n_out6p0 - n_in7p1) < n_in7p2)
{
n_out7p0 = n_in7p3;
}
else if(n_out6p0 < n_in7p1)
{
n_out7p0 = n_out27p0;
}
else
{
n_out7p0 = n_out15p0;
}
// Output:0
ALBEDO = n_out7p0;
EMISSION = n_out7p0;
}
void light() {
// Output:0
}
"
graph_offset = Vector2( -269.682, 10.7785 )
nodes/fragment/0/position = Vector2( 1180, 260 )
nodes/fragment/4/node = SubResource( 3 )
nodes/fragment/4/position = Vector2( -520, -80 )
nodes/fragment/5/node = SubResource( 4 )
nodes/fragment/5/position = Vector2( -580, 20 )
nodes/fragment/6/node = SubResource( 5 )
nodes/fragment/6/position = Vector2( -100, 40 )
nodes/fragment/7/node = SubResource( 6 )
nodes/fragment/7/position = Vector2( 840, 280 )
nodes/fragment/8/node = SubResource( 11 )
nodes/fragment/8/position = Vector2( -520, -180 )
nodes/fragment/9/node = SubResource( 12 )
nodes/fragment/9/position = Vector2( -320, -100 )
nodes/fragment/12/node = SubResource( 7 )
nodes/fragment/12/position = Vector2( -280, 580 )
nodes/fragment/15/node = SubResource( 9 )
nodes/fragment/15/position = Vector2( -300, 220 )
nodes/fragment/26/node = SubResource( 13 )
nodes/fragment/26/position = Vector2( 360, 500 )
nodes/fragment/27/node = SubResource( 14 )
nodes/fragment/27/position = Vector2( 620, 520 )
nodes/fragment/28/node = SubResource( 15 )
nodes/fragment/28/position = Vector2( 40, 340 )
nodes/fragment/33/node = SubResource( 20 )
nodes/fragment/33/position = Vector2( 160, 440 )
nodes/fragment/connections = PoolIntArray( 6, 0, 7, 0, 4, 0, 9, 1, 8, 0, 9, 0, 15, 0, 7, 4, 27, 0, 7, 5, 6, 0, 27, 0, 6, 0, 28, 0, 28, 0, 33, 0, 6, 0, 7, 0, 4, 0, 9, 1, 8, 0, 9, 0, 15, 0, 7, 4, 27, 0, 7, 5, 6, 0, 27, 0, 6, 0, 28, 0, 28, 0, 33, 0, 7, 0, 0, 0, 6, 0, 7, 0, 4, 0, 9, 1, 8, 0, 9, 0, 15, 0, 7, 4, 27, 0, 7, 5, 6, 0, 27, 0, 6, 0, 28, 0, 28, 0, 33, 0, 7, 0, 0, 0, 9, 0, 6, 0, 5, 0, 6, 1, 12, 0, 26, 0, 15, 0, 26, 1, 33, 0, 26, 2, 26, 0, 27, 3, 26, 0, 27, 4, 12, 0, 27, 5, 7, 0, 0, 5 )