How does apparent depth depend on viewing angle?

In derivations of apparent depth and articles on refraction the approximation that the viewing angle is small is made in order to derive that $$D_a = \frac{n_v}{n_o} D_o,$$ where $$D_a$$ is the apparent depth, $$D_o$$ is the true depth of the object, $$n_o$$ is the index of refraction the object is in, and $$n_v$$ is the index of refraction the viewer is in. That the small angle approximation is mentioned so much suggests that the full answer depends on viewing angle. What is the full formula for the apparent position of the object as a function of viewing angle?

One way to derive the location of the image produced is to rely on geometric optics and Snell's law. To do this, we impose a coordinate system where the object is at $$(0,-D_o)$$ and the viewer is somewhere in quadrant $$\mathrm{I}$$ viewing the object using a light ray that intersects the interface with angle $$\theta_o$$ to the surface normal in the object's medium, and $$\theta_v$$ to the normal in the viewer's medium. The path the light ray follows is then given by \begin{align} y&=\left\{\begin{array}{ll} \cot\theta_o x - D_o & x\le D_o\tan\theta_o \\ \cot\theta_v (x-D_o\tan\theta_o) & x > D_o\tan\theta_o. \end{array}\right. \end{align}

Snell's law dictates that $$n_o\sin\theta_o=n_v\sin\theta_v$$. Applying that to the light ray's path, and using some trig identities, gives: \begin{align} y&=\left\{\begin{array}{ll} \frac{\sqrt{1-\left(\frac{n_v}{n_o}\sin\theta_v\right)^2}}{\frac{n_v}{n_o}\sin\theta_v} x - D_o & x\le D_o \frac{\frac{n_v}{n_o}\sin\theta_v}{\sqrt{1-\left(\frac{n_v}{n_o}\sin\theta_v\right)^2}} \\ \cot\theta_v \left(x - D_o \frac{\frac{n_v}{n_o}\sin\theta_v}{\sqrt{1-\left(\frac{n_v}{n_o}\sin\theta_v\right)^2}}\right) & x > D_o\frac{\frac{n_v}{n_o}\sin\theta_v}{\sqrt{1-\left(\frac{n_v}{n_o}\sin\theta_v\right)^2}}. \end{array}\right. \end{align}

The graph below contains the ray path diagram for an object at $$(0,-1)$$ under water ($$n_o=1.33$$, $$n_v=1$$). The green rays are sampled at equally spaced viewing angles with $$5^\circ$$ increments ($$5^\circ$$ through $$85^\circ$$, inclusive). In geometric optics, the coordinates of the image are given by the point where lines the observed light rays are on intersect. This is graphically illustrated for the rays in the above figure below. Notice that there is not a single point where all of the rays intersect, so the position of the image will, indeed, depend on which rays the observer samples. Assuming that the angles of the observed rays are $$\theta_v$$ and $$\theta_v'$$, the observed $$x$$-position is \begin{align} x_a &= \frac{\frac{\frac{n_v}{n_o}\sin\theta_v'}{\sqrt{1-\left(\frac{n_v}{n_o}\sin\theta_v'\right)^2}}-\frac{\frac{n_v}{n_o}\sin\theta_v}{\sqrt{1-\left(\frac{n_v}{n_o}\sin\theta_v\right)^2}}}{\cot\theta_v'-\cot\theta_v}. \end{align}

As is clear from the second graph above, if the observer samples too many rays (too wide a sampling angle) then no single image is formed. Thus the viewing angles will be nearly equal, allowing us to work to zeroth order in $$\theta_v'-\theta_v$$ (i.e. take the limit as $$\theta_v'-\theta_v \rightarrow 0$$) to get that $$x_a = D_r \frac{\frac{n_v}{n_o}\left(1-\left[\frac{n_v}{n_o}\right]^2\right)\sin^3\theta_v}{\left(1-\left(\frac{n_v}{n_o}\sin\theta_v\right)^2\right)^{3/2}}.$$ In other words, the object appears to be a distance of $$x_a$$ closer to the viewer, horizontally, than it really is when $$n_o>n_v$$. As expected, when $$n_v=n_o$$ or $$\theta_v=0$$ then $$x_a=0$$. Interestingly, the offset is $$\mathcal{O}(\theta_v^3)$$ for $$\theta_v\ll 1$$.

Back-substituting $$x_a$$ to get the apparent depth gives $$D_a = D_r \frac{\frac{n_v}{n_o}\cos^3\theta_v}{\left(1-\left(\frac{n_v}{n_o}\sin\theta_v\right)^2\right)^{3/2}}.$$ As expected, if $$n_o=n_v$$ then $$D_a=D_r$$, and when $$\theta_v=0$$ $$D_a=\frac{n_v}{n_o}D_r$$. Adding a parametric plot of $$(x_a,-D_a)$$ in red onto the second graph above shows the line following the bottom of the blue curve of intersections, as expected. Thus, for any given observation ray the image will be formed very near to where the blue line is tangent to the red one. 