2023-10-16 20:10:20 +03:00
|
|
|
[gd_resource type="ShaderMaterial" load_steps=7 format=3 uid="uid://dyuaw57o8y3i"]
|
|
|
|
|
|
|
|
[sub_resource type="VisualShaderNodeColorParameter" id="VisualShaderNodeColorParameter_nl6jr"]
|
|
|
|
parameter_name = "Color"
|
|
|
|
|
|
|
|
[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_8dcmn"]
|
|
|
|
default_input_values = [0, Vector3(0, 0, 0), 1, Vector3(0.5, 0.5, 0.5)]
|
|
|
|
operator = 2
|
|
|
|
|
|
|
|
[sub_resource type="VisualShaderNodeFloatConstant" id="VisualShaderNodeFloatConstant_2331j"]
|
|
|
|
constant = 0.1
|
|
|
|
|
|
|
|
[sub_resource type="VisualShaderNodeFresnel" id="VisualShaderNodeFresnel_tghd5"]
|
|
|
|
|
|
|
|
[sub_resource type="VisualShaderNodeVectorOp" id="VisualShaderNodeVectorOp_wy3ip"]
|
|
|
|
operator = 2
|
|
|
|
|
|
|
|
[sub_resource type="VisualShader" id="VisualShader_wb0u4"]
|
|
|
|
code = "shader_type spatial;
|
2023-10-23 00:01:06 +03:00
|
|
|
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_schlick_ggx;
|
|
|
|
|
2023-10-16 20:10:20 +03:00
|
|
|
uniform vec4 Color : source_color;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void fragment() {
|
|
|
|
// ColorParameter:2
|
|
|
|
vec4 n_out2p0 = Color;
|
|
|
|
|
|
|
|
|
|
|
|
// FloatConstant:4
|
|
|
|
float n_out4p0 = 0.100000;
|
|
|
|
|
|
|
|
|
|
|
|
// VectorOp:3
|
|
|
|
vec3 n_out3p0 = vec3(n_out2p0.xyz) * vec3(n_out4p0);
|
|
|
|
|
|
|
|
|
|
|
|
// Fresnel:5
|
|
|
|
float n_in5p3 = 1.00000;
|
|
|
|
float n_out5p0 = pow(1.0 - clamp(dot(NORMAL, VIEW), 0.0, 1.0), n_in5p3);
|
|
|
|
|
|
|
|
|
|
|
|
// VectorOp:6
|
|
|
|
vec3 n_out6p0 = vec3(n_out2p0.xyz) * vec3(n_out5p0);
|
|
|
|
|
|
|
|
|
|
|
|
// Output:0
|
|
|
|
ALBEDO = n_out3p0;
|
|
|
|
EMISSION = n_out6p0;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
"
|
|
|
|
nodes/fragment/0/position = Vector2(660, 60)
|
|
|
|
nodes/fragment/2/node = SubResource("VisualShaderNodeColorParameter_nl6jr")
|
|
|
|
nodes/fragment/2/position = Vector2(40, 40)
|
|
|
|
nodes/fragment/3/node = SubResource("VisualShaderNodeVectorOp_8dcmn")
|
|
|
|
nodes/fragment/3/position = Vector2(360, 60)
|
|
|
|
nodes/fragment/4/node = SubResource("VisualShaderNodeFloatConstant_2331j")
|
|
|
|
nodes/fragment/4/position = Vector2(20, 180)
|
|
|
|
nodes/fragment/5/node = SubResource("VisualShaderNodeFresnel_tghd5")
|
|
|
|
nodes/fragment/5/position = Vector2(40, 340)
|
|
|
|
nodes/fragment/6/node = SubResource("VisualShaderNodeVectorOp_wy3ip")
|
|
|
|
nodes/fragment/6/position = Vector2(360, 220)
|
|
|
|
nodes/fragment/connections = PackedInt32Array(2, 0, 3, 0, 3, 0, 0, 0, 4, 0, 3, 1, 2, 0, 6, 0, 5, 0, 6, 1, 6, 0, 0, 5)
|
|
|
|
|
|
|
|
[resource]
|
|
|
|
render_priority = 0
|
|
|
|
shader = SubResource("VisualShader_wb0u4")
|
|
|
|
shader_parameter/Color = Color(0.301961, 0.392157, 0.988235, 1)
|