Sample method accepts a UV coordinate (where the texture covers the [0, 1] range), does mipmap selection based on the UV derivatives, applies addressing modes (clamp, wrap, border) and does filtering (bilinear, trilinear, aniso).
Load method accepts a texel coordinate in the [0, textureWidth - 1] x [0, textureHeight - 1] range, and the desired mip level, and simply loads a single texel. Coordinates outside the texture's range just return zero, and no filtering is done.
When trying to map a texture 1:1 to the screen, it's convenient to combine
Load with the
SV_Position input semantic in a pixel shader, as they're in the same units. So you can do this:
void ps_main(float4 screenPos : SV_Position, ...)
float depth = depthTexture.Load(int3(screenPos.xy, 0));
That way you don't need to calculate any UVs. However, this only works if the texture is the same size as the screen; so you can't load half-res or quarter-res textures this way. For those, you'd have to calculate UVs and use