\begin{algorithm}[t]
	\caption{\label{alg:inScatteredRadiance}
		Monte Carlo estimation of $\Lins$
	}
	\begin{algorithmic}[1]
		\Function{inScatRadiance}{$\bx$, $\bom$}
			\If{$\bx \in \domain\setminus\boundary$} \Comment{\eqref{eqn:rte3d_Lins}}
				\State Draw $\bom' \sim \phase(\bx, -\bom', \bom)$
				\State $\Lins \gets \Lv(\bx, \bom')$ \Comment{side path}
			\Else \Comment{\eqref{eqn:rte3d_Lins_boundary}}
				\State Draw $\bom' \sim \phase(\bx + \epsilon\,\bom, -\bom', \bom)$
					\Comment{$\epsilon \to 0^+$}
				\If{$\langle \gnorm(\bx), \bom' \rangle > 0$}
					\State $\Lins \gets \Lv(\bx, \bom')$ \Comment{side path}
				\Else
					\State $\Lins \gets \Ls(\bx, \bom')$ \Comment{side path}
				\EndIf
			\EndIf
			\State \Return $\Lins$
		\EndFunction
	\end{algorithmic}
\end{algorithm}
