xrjamfeb2025/scenes/manipulator/manipulatorsphere.tres
2025-02-15 11:58:27 -07:00

79 lines
2.3 KiB
Text

[gd_resource type="VisualShader" load_steps=7 format=3 uid="uid://dilr5r6k3ik7t"]
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_5b52k"]
input_name = "normal"
[sub_resource type="VisualShaderNodeDotProduct" id="VisualShaderNodeDotProduct_ktfjh"]
[sub_resource type="VisualShaderNodeInput" id="VisualShaderNodeInput_s5g41"]
input_name = "view"
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_1sq4e"]
default_input_values = [0, 1.0, 1, 0.0]
operator = 1
[sub_resource type="VisualShaderNodeFloatOp" id="VisualShaderNodeFloatOp_sui6q"]
default_input_values = [0, 0.0, 1, 5.0]
operator = 5
[sub_resource type="VisualShaderNodeColorParameter" id="VisualShaderNodeColorParameter_mm7j8"]
parameter_name = "Albedo"
default_value_enabled = true
[resource]
code = "shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_lambert, specular_schlick_ggx;
uniform vec4 Albedo : source_color = vec4(1.000000, 1.000000, 1.000000, 1.000000);
void fragment() {
// ColorParameter:8
vec4 n_out8p0 = Albedo;
// Input:2
vec3 n_out2p0 = NORMAL;
// Input:4
vec3 n_out4p0 = VIEW;
// DotProduct:3
float n_out3p0 = dot(n_out2p0, n_out4p0);
// FloatOp:5
float n_in5p0 = 1.00000;
float n_out5p0 = n_in5p0 - n_out3p0;
// FloatOp:6
float n_in6p1 = 5.00000;
float n_out6p0 = pow(n_out5p0, n_in6p1);
// Output:0
ALBEDO = vec3(n_out8p0.xyz);
ALPHA = n_out6p0;
EMISSION = vec3(n_out6p0);
}
"
nodes/fragment/0/position = Vector2(620, 180)
nodes/fragment/2/node = SubResource("VisualShaderNodeInput_5b52k")
nodes/fragment/2/position = Vector2(-940, 280)
nodes/fragment/3/node = SubResource("VisualShaderNodeDotProduct_ktfjh")
nodes/fragment/3/position = Vector2(-420, 280)
nodes/fragment/4/node = SubResource("VisualShaderNodeInput_s5g41")
nodes/fragment/4/position = Vector2(-940, 500)
nodes/fragment/5/node = SubResource("VisualShaderNodeFloatOp_1sq4e")
nodes/fragment/5/position = Vector2(-80, 180)
nodes/fragment/6/node = SubResource("VisualShaderNodeFloatOp_sui6q")
nodes/fragment/6/position = Vector2(280, 180)
nodes/fragment/8/node = SubResource("VisualShaderNodeColorParameter_mm7j8")
nodes/fragment/8/position = Vector2(-940, 720)
nodes/fragment/connections = PackedInt32Array(2, 0, 3, 0, 4, 0, 3, 1, 3, 0, 5, 1, 6, 0, 0, 1, 5, 0, 6, 0, 8, 0, 0, 0, 6, 0, 0, 5)