Z Buffer
[Depth Data](https://texonom.com/depth-data-3f1b6800acae4165ae80373d627d851c) 


같은 픽셀에서 여러 물체중 어떤걸 표출할지 정하기 위해
but not enough memory to store all object
ray tracing 에서는 그냥 제일 가까운 거 찾음

1. camera to origin $m_e$
> $$N = \begin{pmatrix}u & v & w\end{pmatrix}$$
> matrix composed with unit axis vector
> $$\begin{pmatrix}p^1 \\ 1\end{pmatrix} =\begin{pmatrix}N^T && -N^Te \\ 0 & 1 \end{pmatrix}\begin{pmatrix}p \\ 1\end{pmatrix}$$
2. frustum to box $m_p$
> $$m_p=\begin{pmatrix}1 & 0 & 0 & 0 \\0 & 1 & 0 & 0 \\0 & 0 & (n+f)/n & -f \\0 & 0 & 1/n & 0 \\\end{pmatrix}\begin{pmatrix}x \\y \\z \\1 \\\end{pmatrix}$$
3. box to unit box $m_o$



> [Untitled](https://www.cs.ucr.edu/~craigs/courses/2022-fall-cs-130/lectures/pipeline-transforms.pdf)





