ue;
    invertYInterpolator = invertInterpolator;
    }

    float4 t00 = tex2D(TextureSampler, float2(XCoords[0], YCoords[0]));
    float4 t10 = tex2D(TextureSampler, float2(XCoords[1], YCoords[0]));
    float4 t01 = tex2D(TextureSampler, float2(XCoords[0], YCoords[1]));
    float4 t11 = tex2D(TextureSampler, float2(XCoords[1], YCoords[1]));

    float2 xyInterp = frac(float2(XCoords[0], YCoords[0]) * imageHalfPixelDimensions.xy);

    if (invertXInterpolator)
    {
        xyInterp.x = 1 - xyInterp.x;
    }

    if (invertYInterpolator)
    {
        xyInterp.y = 1 - xyInterp.y;
    }

    float4 ty0 = lerp(t00, t10, xyInterp.x);
    float4 ty1 = lerp(t01, t11, xyInterp.x);

    psStageData.Color = lerp(ty0, ty1, xyInterp.y);
}
