shader_type canvas_item;
//render_mode skip_vertex_transform;

uniform sampler2D point_texture;

uniform ivec2 point_texture_size;
uniform ivec2 canvas_size;

void vertex() {
	int id = INSTANCE_ID;
	int x = id % point_texture_size.x;
	int y = id / point_texture_size.x;
	// This feels dumb
	vec2 uv = vec2(float(x), float(y));
	vec4 point_data = texture(point_texture, uv);

	vec2 pos = point_data.xy;
	float angle = point_data.z;

	VERTEX=pos;
}

void fragment() {
	COLOR=vec4(1, 1, 1, 1);
}