input View {
  mat4 mvp,
  mat4 proj,
  mat4 proj_inverse,
  mat4 view,
  mat4 world, //geometry.world atm
  float2 fov, //fov.x, fov.y
  float2 resolution,
  float4 target_region,
  float4 target_region_size
}

input UniformShaderData {
    #0 image2D image,
    float4 rect,
    bool flipy
}

stage vertex vert_layer_pass(
    input {},
    vertex in {
        #0 float2 pos,
        #1 float2 uv
    },
    fragment out { float2 uv }
) {
  out.uv = in.uv;
  stage.pos = float4(in.pos, 0.0, 1.0);
}

stage fragment clear(
    input { View view, UniformShaderData pass },
    fragment in { float2 uv }
) {

  stage.color[0] = float4(1, 0, 0, 1)
  return;
}