You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
4.6 KiB
139 lines
4.6 KiB
[gd_resource type="VisualShader" load_steps=16 format=3 uid="uid://c1r07k4gw7q3w"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://45tpikb0js5i" path="res://3d/models/textures/CHAR_Abe_emit.png" id="1_12cij"]
|
|
[ext_resource type="Texture2D" uid="uid://bi3cljuc4dicl" path="res://3d/models/textures/CHAR_Abe_diffuse.png" id="3_uxtot"]
|
|
[ext_resource type="Texture2D" uid="uid://dhdeki5r0pg63" path="res://3d/models/textures/CHAR_Abe_metal-CHAR_Abe_roughness.png" id="4_ihydq"]
|
|
[ext_resource type="Texture2D" uid="uid://bcilhv0vmo23e" path="res://3d/models/textures/CHAR_Abe_normal.png" id="5_wlfoi"]
|
|
|
|
[sub_resource type="VisualShaderNodeFloatConstant" id="VisualShaderNodeFloatConstant_ecx0m"]
|
|
constant = 0.2
|
|
|
|
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_fl837"]
|
|
input_name = "uv2"
|
|
|
|
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_p4c60"]
|
|
operator = 2
|
|
|
|
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_fya24"]
|
|
texture = ExtResource("1_12cij")
|
|
texture_type = 1
|
|
|
|
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_gndfb"]
|
|
texture = ExtResource("3_uxtot")
|
|
texture_type = 1
|
|
|
|
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_nomvq"]
|
|
texture = ExtResource("4_ihydq")
|
|
|
|
[sub_resource type="VisualShaderNodeVectorDecompose" id="VisualShaderNodeVectorDecompose_jkogv"]
|
|
output_port_for_preview = 1
|
|
|
|
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_ficjf"]
|
|
input_name = "uv"
|
|
|
|
[sub_resource type="VisualShaderNodeTexture" id="VisualShaderNodeTexture_63lrl"]
|
|
texture = ExtResource("5_wlfoi")
|
|
texture_type = 1
|
|
|
|
[sub_resource type="VisualShaderNodeFloatConstant" id="VisualShaderNodeFloatConstant_aakqf"]
|
|
constant = 0.5
|
|
|
|
[sub_resource type="VisualShaderNodeFloatConstant" id="VisualShaderNodeFloatConstant_trpxg"]
|
|
constant = 16.0
|
|
|
|
[resource]
|
|
code = "shader_type spatial;
|
|
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_schlick_ggx;
|
|
|
|
uniform sampler2D tex_frg_2 : source_color;
|
|
uniform sampler2D tex_frg_4;
|
|
uniform sampler2D tex_frg_13 : source_color;
|
|
uniform sampler2D tex_frg_7 : source_color;
|
|
|
|
|
|
|
|
void fragment() {
|
|
// Input:6
|
|
vec2 n_out6p0 = UV;
|
|
|
|
|
|
// Texture2D:2
|
|
vec4 n_out2p0 = texture(tex_frg_2, n_out6p0);
|
|
|
|
|
|
// Texture2D:4
|
|
vec4 n_out4p0 = texture(tex_frg_4, n_out6p0);
|
|
|
|
|
|
// VectorDecompose:5
|
|
float n_out5p0 = vec3(n_out4p0.xyz).x;
|
|
float n_out5p1 = vec3(n_out4p0.xyz).y;
|
|
float n_out5p2 = vec3(n_out4p0.xyz).z;
|
|
|
|
|
|
// Texture2D:13
|
|
vec4 n_out13p0 = texture(tex_frg_13, n_out6p0);
|
|
|
|
|
|
// Texture2D:7
|
|
vec4 n_out7p0 = texture(tex_frg_7, n_out6p0);
|
|
|
|
|
|
// FloatConstant:8
|
|
float n_out8p0 = 0.500000;
|
|
|
|
|
|
// FloatConstant:9
|
|
float n_out9p0 = 16.000000;
|
|
|
|
|
|
// Input:11
|
|
vec2 n_out11p0 = UV2;
|
|
|
|
|
|
// FloatOp:12
|
|
float n_out12p0 = n_out9p0 * n_out11p0.x;
|
|
|
|
|
|
// FloatConstant:10
|
|
float n_out10p0 = 0.200000;
|
|
|
|
|
|
// Output:0
|
|
ALBEDO = vec3(n_out2p0.xyz);
|
|
METALLIC = n_out5p2;
|
|
ROUGHNESS = n_out5p1;
|
|
EMISSION = vec3(n_out13p0.xyz);
|
|
NORMAL_MAP = vec3(n_out7p0.xyz);
|
|
NORMAL_MAP_DEPTH = n_out8p0;
|
|
CLEARCOAT = n_out12p0;
|
|
CLEARCOAT_ROUGHNESS = n_out10p0;
|
|
|
|
|
|
}
|
|
"
|
|
nodes/fragment/0/position = Vector2(940, 280)
|
|
nodes/fragment/2/node = SubResource("VisualShaderNodeTexture_gndfb")
|
|
nodes/fragment/2/position = Vector2(-320, -100)
|
|
nodes/fragment/4/node = SubResource("VisualShaderNodeTexture_nomvq")
|
|
nodes/fragment/4/position = Vector2(-320, 160)
|
|
nodes/fragment/5/node = SubResource("VisualShaderNodeVectorDecompose_jkogv")
|
|
nodes/fragment/5/position = Vector2(-80, 160)
|
|
nodes/fragment/6/node = SubResource("VisualShaderNodeInput_ficjf")
|
|
nodes/fragment/6/position = Vector2(-900, 300)
|
|
nodes/fragment/7/node = SubResource("VisualShaderNodeTexture_63lrl")
|
|
nodes/fragment/7/position = Vector2(-320, 440)
|
|
nodes/fragment/8/node = SubResource("VisualShaderNodeFloatConstant_aakqf")
|
|
nodes/fragment/8/position = Vector2(-140, 940)
|
|
nodes/fragment/9/node = SubResource("VisualShaderNodeFloatConstant_trpxg")
|
|
nodes/fragment/9/position = Vector2(-140, 640)
|
|
nodes/fragment/10/node = SubResource("VisualShaderNodeFloatConstant_ecx0m")
|
|
nodes/fragment/10/position = Vector2(180, 780)
|
|
nodes/fragment/11/node = SubResource("VisualShaderNodeInput_fl837")
|
|
nodes/fragment/11/position = Vector2(-240, 720)
|
|
nodes/fragment/12/node = SubResource("VisualShaderNodeFloatOp_p4c60")
|
|
nodes/fragment/12/position = Vector2(220, 580)
|
|
nodes/fragment/13/node = SubResource("VisualShaderNodeTexture_fya24")
|
|
nodes/fragment/13/position = Vector2(-460, 760)
|
|
nodes/fragment/connections = PackedInt32Array(4, 0, 5, 0, 2, 0, 0, 0, 5, 2, 0, 2, 5, 1, 0, 3, 7, 0, 0, 9, 8, 0, 0, 10, 6, 0, 2, 0, 6, 0, 4, 0, 6, 0, 7, 0, 10, 0, 0, 14, 9, 0, 12, 0, 11, 0, 12, 1, 12, 0, 0, 13, 6, 0, 13, 0, 13, 0, 0, 5)
|