How much memory is required to implement the z-buffer algorithm for a 512 x…
2014
How much memory is required to implement the z-buffer algorithm for a 512 x 512 x 24 bit-plane image?
Answer: C. 1.5 MB — Concept: A depth-buffer renderer maintains a depth value for every pixel to decide surface visibility and a frame-buffer value for every pixel to hold the…
- A.
768 KB
- B.
1 MB
- C.
1.5 MB
- D.
2 MB
Attempted by 47 students.
Show answer & explanation
Correct answer: C
Concept: A depth-buffer renderer maintains a depth value for every pixel to decide surface visibility and a frame-buffer value for every pixel to hold the displayed colour. In the standard convention used by this exam item, both buffers use the stated 24-bit width, so implementation memory is the sum of their per-pixel storage.
Application:
The image contains 512 × 512 = 262,144 pixel positions.
One 24-bit buffer uses 262,144 × 24 = 6,291,456 bits.
Dividing by 8 gives 786,432 bytes = 768 KB for one buffer.
The depth buffer and frame buffer together use 2 × 786,432 = 1,572,864 bytes.
Since 1 MB = 1,048,576 bytes, 1,572,864 ÷ 1,048,576 = 1.5 MB.
Cross-check: The combined storage is 2 × 512 × 512 × 24 = 12,582,912 bits. Dividing by 8 and then by 1,048,576 again gives 1.5 MB.
Result: The required memory is 1.5 MB.
A video solution is available for this question — log in and enroll to watch it.