meat_madness_redux/godot/tests/curve_texture_test.tscn

31 lines
743 B
Plaintext
Raw Permalink Normal View History

2022-12-29 14:09:36 -07:00
[gd_scene load_steps=5 format=2]
[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
uniform sampler2D curve;
void fragment() {
COLOR.rgb = vec3(0.0, 0.0, 0.0);
COLOR.r = texture(curve, vec2(SCREEN_UV.x, 0.0)).r;
}"
[sub_resource type="Curve" id=3]
_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 1, 1 ), 0.0, 0.0, 0, 0 ]
[sub_resource type="CurveTexture" id=4]
curve = SubResource( 3 )
[sub_resource type="ShaderMaterial" id=2]
shader = SubResource( 1 )
shader_param/curve = SubResource( 4 )
[node name="Node2D" type="Node2D"]
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="ColorRect" type="ColorRect" parent="CanvasLayer"]
material = SubResource( 2 )
anchor_right = 1.0
anchor_bottom = 1.0