Question: A program displays four rectangles colored orange, blue, black, and gray. The black rectangle is the nearest to the camera, the gray rectangle the next

A program displays four rectangles colored orange, blue, black, and gray. The black rectangle is the nearest to the camera, the gray rectangle the next nearest, then the orange rectangle, and the blue rectangle is the farthest away. The image to the right is to give you some idea what the image might look like.
For reference, the z coordinates of the vertices for the various rectangles are as follows: for the black rectangle, z =.3; for the gray rectangle, z =.5; for the orange rectangle, z =.7; and, for the blue rectangle, z =.9.
In the program, the rectangles are rendered in this order: black first, then gray, then blue, and, orange is rendered last. The parts of this question ask you to describe how the rendered rectangles would look using depth testing and without depth testing.
1. If depth testing were not used in rendering, what would be the visual layering of the rectangles? That is, first, which rectangle would cover the other rectangles? Then, which rectangle would be behind the first but would cover the other two. Then, which rectangle would be behind the first two but would cover the last rectangle. And, finally, which rectangle would be covered by all the other rectangles.
2. If depth testing were being used in rendering, what would be the visual layering of the rectangles? That is, first, which rectangle would cover the other rectangles? Then, which rectangle would be behind the first but would cover the other two. Then, which rectangle would be behind the first two but would cover the last rectangle. And, finally, which rectangle would be covered by all the other rectangles.
 A program displays four rectangles colored orange, blue, black, and gray.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!