#pragma BLENDER_REQUIRE(common_view_lib.glsl)

in vec3 pos;
out vec2 uvs;

void main()
{
  /* `pos` contains the coordinates of a quad (-1..1). but we need the coordinates of an image
   * plane (0..1) */
  vec3 image_pos = pos * 0.5 + 0.5;
  vec4 position = point_object_to_ndc(image_pos);
  gl_Position = position;
  uvs = image_pos.xy;
}
