mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-07 19:09:50 +00:00
Rename IndexMap's "alpha" uniform to "include_alpha"
This commit is contained in:
parent
4b3f37a115
commit
3e01247d95
|
@ -3,7 +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;
|
uniform bool include_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
|
||||||
|
@ -16,7 +16,7 @@ void fragment() {
|
||||||
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.rgb = index_color.rgb;
|
COLOR.rgb = index_color.rgb;
|
||||||
if (alpha) {
|
if (include_alpha) {
|
||||||
COLOR.a = index_color.a;
|
COLOR.a = index_color.a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue