#include "depth_normal.fsh"
#include "idioms.sh"

uniform float4 SourceSizeInv;

in float2 UV_f;
out float4 fs_GatheredDepths;

void main() {

    float2 uv = UV_f;
    float2 uv00 = floor(uv * SourceSizeInv.xy) * SourceSizeInv.zw;
    float z00 = _SampleDepth(uv00);
    float z01 = _SampleDepth(uv00 + float2(SourceSizeInv.z, 0.f));
    float z10 = _SampleDepth(uv00 + float2(0.f, SourceSizeInv.w));
    float z11 = _SampleDepth(uv00 + SourceSizeInv.zw);

    fs_GatheredDepths = float4(z00, z01, z10, z11);
}