1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-22 21:43:13 +00:00

Merge branch 'Orama-Interactive:master' into resource

This commit is contained in:
Variable 2024-09-02 13:18:37 +05:00 committed by GitHub
commit b2fe358950
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -3,6 +3,7 @@ shader_type canvas_item;
render_mode unshaded; render_mode unshaded;
uniform sampler2D map_texture : filter_nearest; // The map texture uniform sampler2D map_texture : filter_nearest; // The map texture
uniform bool alpha = false;
// (begin DESCRIPTION) // (begin DESCRIPTION)
// The Red and Green values (0-255) of tool color will be treated as an x and y position // The Red and Green values (0-255) of tool color will be treated as an x and y position
@ -14,5 +15,8 @@ void fragment(){
vec2 map_size = vec2(textureSize(map_texture, 0)); vec2 map_size = vec2(textureSize(map_texture, 0));
vec2 lookup_uv = vec2(round(col.x * 255.0)/(map_size.x), round(col.y * 255.0)/(map_size.y)); vec2 lookup_uv = vec2(round(col.x * 255.0)/(map_size.x), round(col.y * 255.0)/(map_size.y));
vec4 index_color = texture(map_texture, lookup_uv); vec4 index_color = texture(map_texture, lookup_uv);
COLOR = index_color; COLOR.rgb = index_color.rgb;
if (alpha) {
COLOR.a = index_color.a;
}
} }

View file

@ -59,7 +59,7 @@ grow_vertical = 2
size_flags_horizontal = 0 size_flags_horizontal = 0
size_flags_vertical = 0 size_flags_vertical = 0
expand_mode = 1 expand_mode = 1
stretch_mode = 6 stretch_mode = 5
[node name="TransparentChecker" parent="CelTexture" instance=ExtResource("2_mi8wp")] [node name="TransparentChecker" parent="CelTexture" instance=ExtResource("2_mi8wp")]
show_behind_parent = true show_behind_parent = true