ile-de-test/addons/zylann.hterrain/tools/texture_editor/display_alpha_slice.gdshader

10 lines
216 B
Text
Raw Permalink Normal View History

2023-10-05 18:02:23 +00:00
shader_type canvas_item;
uniform sampler2DArray u_texture_array;
uniform float u_index;
void fragment() {
vec4 col = texture(u_texture_array, vec3(UV.x, UV.y, u_index));
COLOR = vec4(col.a, col.a, col.a, 1.0);
}