<- back
practice final questions
1. Consider a camera with near clip plane at $n = -1$ and far clip plane at $f = -100$. Assume a linear 8-bit depth buffer, i.e. $$\text{depth} = \left\lfloor\frac{z_{\text{camera}} - n}{f - n}\right\rfloor * 255,$$ and a "less than or equal to" depth test (i.e. a fragment passes the depth test iff its depth is less than or equal to what is already in the depth buffer). The camera uses a typical perspective projection with angle of view of $90\deg$. NOTE: $\lfloor\cdot\rfloor$ is the floor operator. Consider rasterizing a blue triangle and an orange triangle. Say the (face) normal vectors of both triangles are parallel to each other, and also parallel to the camera's $\hat{\mathbf{z}}$-axis. Neglecting issues of floating point precision, what is the smallest distance between the two triangles that will guarantee no z-fighting? (I.e. what is the smallest distance in camera coordinates that will prevent the two triangles from writing identical values to the depth buffer?)