-
Notifications
You must be signed in to change notification settings - Fork 3
/
SampleShaderMaterialShine.tres
229 lines (178 loc) · 6.71 KB
/
SampleShaderMaterialShine.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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
[gd_resource type="ShaderMaterial" load_steps=28 format=2]
[sub_resource type="VisualShaderNodeVectorCompose" id=1]
[sub_resource type="VisualShaderNodeCompare" id=2]
default_input_values = [ 0, 0.0, 1, 0.0, 2, 0.17 ]
[sub_resource type="VisualShaderNodeCompare" id=3]
default_input_values = [ 0, 0.0, 1, 0.0, 2, 0.4 ]
[sub_resource type="VisualShaderNodeCompare" id=4]
default_input_values = [ 0, 0.0, 1, 0.2, 2, 1e-05 ]
function = 2
[sub_resource type="VisualShaderNodeInput" id=5]
input_name = "time"
[sub_resource type="OpenSimplexNoise" id=6]
[sub_resource type="NoiseTexture" id=7]
seamless = true
noise = SubResource( 6 )
[sub_resource type="VisualShaderNodeTexture" id=8]
output_port_for_preview = 0
texture = SubResource( 7 )
[sub_resource type="VisualShaderNodeScalarFunc" id=9]
output_port_for_preview = 0
function = 1
[sub_resource type="VisualShaderNodeScalarOp" id=10]
output_port_for_preview = 0
[sub_resource type="VisualShaderNodeScalarFunc" id=11]
function = 12
[sub_resource type="VisualShaderNodeInput" id=12]
input_name = "texture"
[sub_resource type="VisualShaderNodeScalarOp" id=13]
output_port_for_preview = 0
default_input_values = [ 0, 1.0, 1, 1.0 ]
operator = 1
[sub_resource type="VisualShaderNodeVectorOp" id=14]
operator = 1
[sub_resource type="VisualShaderNodeScalarOp" id=15]
output_port_for_preview = 0
operator = 2
[sub_resource type="VisualShaderNodeVectorOp" id=16]
[sub_resource type="VisualShaderNodeVectorOp" id=17]
output_port_for_preview = 0
operator = 2
[sub_resource type="VisualShaderNodeVec3Constant" id=18]
output_port_for_preview = 0
constant = Vector3( 1, 1, 1 )
[sub_resource type="VisualShaderNodeVec3Constant" id=19]
output_port_for_preview = 0
[sub_resource type="VisualShaderNodeVectorOp" id=20]
operator = 2
[sub_resource type="VisualShaderNodeTexture" id=21]
source = 2
texture_type = 1
[sub_resource type="VisualShaderNodeInput" id=22]
input_name = "uv"
[sub_resource type="VisualShaderNodeVec3Constant" id=23]
output_port_for_preview = 0
constant = Vector3( 1, 1, 0 )
[sub_resource type="VisualShaderNodeCompare" id=24]
output_port_for_preview = 0
default_input_values = [ 0, 0.0, 1, 0.0, 2, 0.3 ]
[sub_resource type="VisualShaderNodeVectorDecompose" id=25]
[sub_resource type="VisualShaderNodeVectorDecompose" id=26]
[sub_resource type="VisualShader" id=27]
code = "shader_type canvas_item;
void vertex() {
// Output:0
}
void fragment() {
// Vector:28
vec3 n_out28p0 = vec3(0.000000, 0.000000, 0.000000);
// Input:4
vec3 n_out4p0 = vec3(UV, 0.0);
// Input:2
// Texture:3
vec3 n_out3p0;
float n_out3p1;
{
vec4 _tex_read = texture(TEXTURE, n_out4p0.xy);
n_out3p0 = _tex_read.rgb;
n_out3p1 = _tex_read.a;
}
// VectorDecompose:8
float n_out8p0 = n_out3p0.x;
float n_out8p1 = n_out3p0.y;
float n_out8p2 = n_out3p0.z;
// Vector:5
vec3 n_out5p0 = vec3(1.000000, 1.000000, 0.000000);
// VectorDecompose:9
float n_out9p0 = n_out5p0.x;
float n_out9p1 = n_out5p0.y;
float n_out9p2 = n_out5p0.z;
// Compare:7
float n_in7p2 = 0.30000;
bool n_out7p0 = (abs(n_out8p0 - n_out9p0) < n_in7p2);
// Compare:11
float n_in11p2 = 0.17000;
bool n_out11p0 = (abs(n_out8p1 - n_out9p1) < n_in11p2);
// Compare:12
float n_in12p2 = 0.40000;
bool n_out12p0 = (abs(n_out8p2 - n_out9p2) < n_in12p2);
// VectorCompose:10
vec3 n_out10p0 = vec3((n_out7p0 ? 1.0 : 0.0), (n_out11p0 ? 1.0 : 0.0), (n_out12p0 ? 1.0 : 0.0));
// Compare:13
float n_in13p1 = 0.20000;
bool n_out13p0 = dot(n_out10p0, vec3(0.333333, 0.333333, 0.333333))>n_in13p1;
// ScalarOp:21
float n_in21p0 = 1.00000;
float n_out21p0 = n_in21p0 - (n_out13p0 ? 1.0 : 0.0);
// VectorOp:22
vec3 n_out22p0 = n_out3p0 - vec3(n_out21p0);
// VectorOp:29
vec3 n_out29p0 = n_out28p0 * n_out22p0;
// Vector:27
vec3 n_out27p0 = vec3(1.000000, 1.000000, 1.000000);
// ScalarOp:23
float n_out23p0 = n_out21p0 * dot(n_out27p0, vec3(0.333333, 0.333333, 0.333333));
// VectorOp:25
vec3 n_out25p0 = n_out29p0 + vec3(n_out23p0);
// Output:0
COLOR.rgb = n_out25p0;
}
void light() {
// Output:0
}
"
graph_offset = Vector2( 1204, 281 )
mode = 1
flags/light_only = false
nodes/fragment/0/position = Vector2( 2520, 180 )
nodes/fragment/2/node = SubResource( 12 )
nodes/fragment/2/position = Vector2( -220, 340 )
nodes/fragment/3/node = SubResource( 21 )
nodes/fragment/3/position = Vector2( 20, -80 )
nodes/fragment/4/node = SubResource( 22 )
nodes/fragment/4/position = Vector2( -200, 220 )
nodes/fragment/5/node = SubResource( 23 )
nodes/fragment/5/position = Vector2( 200, 420 )
nodes/fragment/7/node = SubResource( 24 )
nodes/fragment/7/position = Vector2( 880, 120 )
nodes/fragment/8/node = SubResource( 25 )
nodes/fragment/8/position = Vector2( 500, 220 )
nodes/fragment/9/node = SubResource( 26 )
nodes/fragment/9/position = Vector2( 560, 460 )
nodes/fragment/10/node = SubResource( 1 )
nodes/fragment/10/position = Vector2( 1100, 260 )
nodes/fragment/11/node = SubResource( 2 )
nodes/fragment/11/position = Vector2( 880, 420 )
nodes/fragment/12/node = SubResource( 3 )
nodes/fragment/12/position = Vector2( 880, 600 )
nodes/fragment/13/node = SubResource( 4 )
nodes/fragment/13/position = Vector2( 1240, 400 )
nodes/fragment/14/node = SubResource( 5 )
nodes/fragment/14/position = Vector2( 40, 1060 )
nodes/fragment/15/node = SubResource( 8 )
nodes/fragment/15/position = Vector2( 560, 660 )
nodes/fragment/16/node = SubResource( 9 )
nodes/fragment/16/position = Vector2( 280, 1060 )
nodes/fragment/17/node = SubResource( 10 )
nodes/fragment/17/position = Vector2( 1280, 900 )
nodes/fragment/18/node = SubResource( 11 )
nodes/fragment/18/position = Vector2( 540, 1060 )
nodes/fragment/21/node = SubResource( 13 )
nodes/fragment/21/position = Vector2( 1460, 300 )
nodes/fragment/22/node = SubResource( 14 )
nodes/fragment/22/position = Vector2( 1680, 120 )
nodes/fragment/23/node = SubResource( 15 )
nodes/fragment/23/position = Vector2( 2080, 320 )
nodes/fragment/25/node = SubResource( 16 )
nodes/fragment/25/position = Vector2( 2300, 200 )
nodes/fragment/26/node = SubResource( 17 )
nodes/fragment/26/position = Vector2( 1660, 600 )
nodes/fragment/27/node = SubResource( 18 )
nodes/fragment/27/position = Vector2( 1160, 600 )
nodes/fragment/28/node = SubResource( 19 )
nodes/fragment/28/position = Vector2( 1520, -140 )
nodes/fragment/29/node = SubResource( 20 )
nodes/fragment/29/position = Vector2( 2080, 180 )
nodes/fragment/connections = PoolIntArray( 2, 0, 3, 2, 4, 0, 3, 0, 3, 0, 8, 0, 5, 0, 9, 0, 9, 0, 7, 1, 8, 0, 7, 0, 8, 1, 11, 0, 9, 1, 11, 1, 8, 2, 12, 0, 9, 2, 12, 1, 12, 0, 10, 2, 11, 0, 10, 1, 7, 0, 10, 0, 10, 0, 13, 0, 4, 0, 15, 0, 14, 0, 16, 0, 15, 0, 17, 0, 16, 0, 18, 0, 13, 0, 21, 1, 3, 0, 22, 0, 21, 0, 22, 1, 18, 0, 17, 1, 25, 0, 0, 0, 27, 0, 26, 0, 17, 0, 26, 1, 22, 0, 29, 1, 28, 0, 29, 0, 29, 0, 25, 0, 21, 0, 23, 0, 23, 0, 25, 1, 27, 0, 23, 1 )
[resource]
shader = SubResource( 27 )