Remove phantom embedded shader
This commit is contained in:
parent
b6b55bd2a5
commit
fb336cc69a
22
Node2D.tscn
22
Node2D.tscn
|
@ -1,30 +1,14 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://palette_mat.tres" type="Material" id=1]
|
||||
[ext_resource path="res://Node2D.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="Shader" id=1]
|
||||
code = "shader_type canvas_item;
|
||||
//uniform usampler2D tex;
|
||||
uniform sampler2D palette;
|
||||
|
||||
void fragment() {
|
||||
//uint color_idx = textureLod(tex, UV, 0.0).r;
|
||||
uint color_idx = uint(textureLod(TEXTURE, UV, 0.0).r * 256.0);
|
||||
COLOR = texelFetch(palette, ivec2(int(color_idx), 0), 0);
|
||||
if (color_idx == uint(0))
|
||||
COLOR.a = 0.0;
|
||||
}
|
||||
"
|
||||
|
||||
[sub_resource type="ShaderMaterial" id=2]
|
||||
shader = SubResource( 1 )
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
[node name="Node2D" type="Node2D" parent="."]
|
||||
material = SubResource( 2 )
|
||||
material = ExtResource( 1 )
|
||||
position = Vector2( 16, 16 )
|
||||
scale = Vector2( 2, 2 )
|
||||
script = ExtResource( 2 )
|
||||
|
|
Loading…
Reference in New Issue