material-maker/addons/material_maker/widgets/gradient_editor.tscn

68 lines
1.7 KiB
Plaintext
Raw Normal View History

[gd_scene load_steps=7 format=2]
[ext_resource path="res://addons/material_maker/widgets/gradient_editor.gd" type="Script" id=1]
2019-09-26 22:32:49 +02:00
[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
void fragment() {
COLOR = vec4(vec3(2.0*fract(0.5*(floor(0.12*FRAGCOORD.x)+floor(0.125*FRAGCOORD.y)))), 1.0);
}"
2019-09-26 22:32:49 +02:00
[sub_resource type="ShaderMaterial" id=2]
shader = SubResource( 1 )
2019-10-22 22:48:00 +02:00
[sub_resource type="Shader" id=6]
code = "shader_type canvas_item;
vec4 gradient(float x) {
if (x < 0.000000000) {
return vec4(0.000000000,0.000000000,0.000000000,0.000000000);
}
2019-10-22 22:48:00 +02:00
return vec4(0.000000000,0.000000000,0.000000000,0.000000000);
}
void fragment() { COLOR = gradient(UV.x); }"
2019-10-22 22:48:00 +02:00
[sub_resource type="ShaderMaterial" id=7]
shader = SubResource( 6 )
[sub_resource type="Theme" id=5]
[node name="Control" type="Control"]
margin_right = 120.0
margin_bottom = 30.0
rect_min_size = Vector2( 120, 32 )
script = ExtResource( 1 )
2019-09-26 22:32:49 +02:00
[node name="Background" type="ColorRect" parent="."]
material = SubResource( 2 )
anchor_right = 1.0
2019-10-22 22:48:00 +02:00
margin_left = 4.0
margin_right = -4.0
margin_bottom = 15.0
rect_min_size = Vector2( 112, 17 )
2019-09-26 22:32:49 +02:00
mouse_filter = 2
2019-09-26 22:32:49 +02:00
[node name="Gradient" type="ColorRect" parent="."]
2019-10-22 22:48:00 +02:00
material = SubResource( 7 )
anchor_right = 1.0
2019-10-22 22:48:00 +02:00
margin_left = 4.0
margin_right = -4.0
margin_bottom = 15.0
rect_min_size = Vector2( 112, 17 )
2019-09-26 22:32:49 +02:00
mouse_filter = 2
theme = SubResource( 5 )
2019-09-26 22:32:49 +02:00
[node name="Popup" type="Popup" parent="Gradient"]
margin_left = 47.0
margin_top = 33.0
margin_right = 353.0
margin_bottom = 475.0
2019-09-26 22:32:49 +02:00
[node name="ColorPicker" type="ColorPicker" parent="Gradient/Popup"]
margin_left = 4.0
margin_top = 4.0
margin_right = 4.0
margin_bottom = 4.0
rect_scale = Vector2( 0.75, 0.75 )
[connection signal="popup_hide" from="Gradient/Popup" to="." method="_on_Popup_popup_hide"]