summaryrefslogtreecommitdiff
path: root/tests/mime-detection/test.escn
blob: fd65e461c40ef767fe1766cb0e78d9de9b508d02 (plain)
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
[gd_scene load_steps=1 format=2]

[sub_resource id=1 type="Shader"]

resource_name = "Shader Nodetree"
code = "shader_type spatial;
render_mode blend_mix, depth_draw_always, cull_back, diffuse_burley, specular_schlick_ggx;



void node_bsdf_principled(vec4 color, float subsurface, vec4 subsurface_color,
        float metallic, float specular, float roughness, float clearcoat,
        float clearcoat_roughness, float anisotropy, float transmission,
        float IOR, out vec3 albedo, out float sss_strength_out,
        out float metallic_out, out float specular_out,
        out float roughness_out, out float clearcoat_out,
        out float clearcoat_gloss_out, out float anisotropy_out,
        out float transmission_out, out float ior) {
    metallic = clamp(metallic, 0.0, 1.0);
    transmission = clamp(transmission, 0.0, 1.0);

    subsurface = subsurface * (1.0 - metallic);

    albedo = mix(color.rgb, subsurface_color.rgb, subsurface);
    sss_strength_out = subsurface;
    metallic_out = metallic;
    specular_out = pow((IOR - 1.0)/(IOR + 1.0), 2)/0.08;
    roughness_out = roughness;
    clearcoat_out = clearcoat * (1.0 - transmission);
    clearcoat_gloss_out = 1.0 - clearcoat_roughness;
    anisotropy_out = clamp(anisotropy, 0.0, 1.0);
    transmission_out = (1.0 - transmission) * (1.0 - metallic);
    ior = IOR;
}

void vertex () {
}

void fragment () {
	
	// node: 'Principled BSDF'
	// type: 'ShaderNodeBsdfPrincipled'
	// input sockets handling
	vec4 node0_in0_basecolor = vec4(0.800000011920929, 0.800000011920929,
		0.800000011920929, 1.0);
	float node0_in1_subsurface = float(0.0);
	vec3 node0_in2_subsurfaceradius = vec3(1.0, 0.20000000298023224,
		0.10000000149011612);
	vec4 node0_in3_subsurfacecolor = vec4(0.800000011920929, 0.800000011920929,
		0.800000011920929, 1.0);
	float node0_in4_metallic = float(0.0);
	float node0_in5_specular = float(0.5);
	float node0_in6_speculartint = float(0.0);
	float node0_in7_roughness = float(0.4000000059604645);
	float node0_in8_anisotropic = float(0.0);
	float node0_in9_anisotropicrotation = float(0.0);
	float node0_in10_sheen = float(0.0);
	float node0_in11_sheentint = float(0.5);
	float node0_in12_clearcoat = float(0.0);
	float node0_in13_clearcoatroughness = float(0.029999999329447746);
	float node0_in14_ior = float(1.4500000476837158);
	float node0_in15_transmission = float(0.0);
	float node0_in16_transmissionroughness = float(0.0);
	vec4 node0_in17_emission = vec4(0.0, 0.0, 0.0, 1.0);
	float node0_in18_alpha = float(1.0);
	vec3 node0_in19_normal = NORMAL;
	vec3 node0_in20_clearcoatnormal = vec3(0.0, 0.0, 0.0);
	vec3 node0_in21_tangent = TANGENT;
	// output sockets definitions
	vec3 node0_bsdf_out0_albedo;
	float node0_bsdf_out1_sss_strength;
	float node0_bsdf_out3_specular;
	float node0_bsdf_out2_metallic;
	float node0_bsdf_out4_roughness;
	float node0_bsdf_out5_clearcoat;
	float node0_bsdf_out6_clearcoat_gloss;
	float node0_bsdf_out7_anisotropy;
	float node0_bsdf_out8_transmission;
	float node0_bsdf_out9_ior;
	
	node_bsdf_principled(node0_in0_basecolor, node0_in1_subsurface,
		node0_in3_subsurfacecolor, node0_in4_metallic, node0_in5_specular,
		node0_in7_roughness, node0_in12_clearcoat, node0_in13_clearcoatroughness,
		node0_in8_anisotropic, node0_in15_transmission, node0_in14_ior,
		node0_bsdf_out0_albedo, node0_bsdf_out1_sss_strength, node0_bsdf_out2_metallic,
		node0_bsdf_out3_specular, node0_bsdf_out4_roughness, node0_bsdf_out5_clearcoat,
		node0_bsdf_out6_clearcoat_gloss, node0_bsdf_out7_anisotropy,
		node0_bsdf_out8_transmission, node0_bsdf_out9_ior);
	
	
	ALBEDO = node0_bsdf_out0_albedo;
	SSS_STRENGTH = node0_bsdf_out1_sss_strength;
	SPECULAR = node0_bsdf_out3_specular;
	METALLIC = node0_bsdf_out2_metallic;
	ROUGHNESS = node0_bsdf_out4_roughness;
	CLEARCOAT = node0_bsdf_out5_clearcoat;
	CLEARCOAT_GLOSS = node0_bsdf_out6_clearcoat_gloss;
	NORMAL = node0_in19_normal;
	// uncomment it when you need it
	// TRANSMISSION = vec3(1.0, 1.0, 1.0) * node0_bsdf_out8_transmission;
	// uncomment it when you are modifing TANGENT
	// TANGENT = normalize(cross(cross(node0_in21_tangent, NORMAL), NORMAL));
	// BINORMAL = cross(TANGENT, NORMAL);
	// uncomment it when you have tangent(UV) set
	// ANISOTROPY = node0_bsdf_out7_anisotropy;
}
"

[sub_resource id=2 type="ShaderMaterial"]

resource_name = ""
shader = SubResource(1)

[sub_resource id=3 type="ArrayMesh"]

resource_name = "Cube"
surfaces/0 = {
	"material":SubResource(2),
	"primitive":4,
	"arrays":[
		Vector3Array(1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0),
		Vector3Array(0.0, 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, 0.375, 0.5, 0.625, 0.5, 0.625, 0.25, 0.375, 0.25, 0.375, 0.75, 0.625, 0.75, 0.625, 0.5, 0.375, 0.5),
		null, ; No UV2,
		null, ; No Bones,
		null, ; No Weights,
		IntArray(0, 2, 1, 0, 3, 2, 4, 6, 5, 4, 7, 6, 8, 10, 9, 8, 11, 10, 12, 14, 13, 12, 15, 14, 16, 18, 17, 16, 19, 18, 20, 22, 21, 20, 23, 22)
	],
	"morph_arrays":[]
}

[node type="Spatial" name="Scene"]

[node name="Cube" type="MeshInstance" parent="."]

mesh = SubResource(3)
visible = true
transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)

[node name="Light" type="OmniLight" parent="."]

light_specular = 1.0
light_color = Color(1.0, 1.0, 1.0, 1.0)
shadow_color = Color(0.0, 0.0, 0.0, 1.0)
light_energy = 10.0
omni_range = 40.0
transform = Transform(-0.290865, -0.771101, 0.566393, -0.0551891, 0.604525, 0.794672, -0.955171, 0.199883, -0.218391, 4.07625, 5.90386, -1.00545)
light_negative = false
shadow_enabled = true

[node name="Camera" type="Camera" parent="."]

far = 100.0
near = 0.1
size = 7.31429
projection = 0
fov = 39.5978
transform = Transform(0.685921, -0.324014, 0.651558, 0.0, 0.895396, 0.445271, -0.727676, -0.305421, 0.61417, 7.35889, 4.95831, 6.92579)