Use of ray tracing for generating images for auto-stereo displays
View Patent ↗Methods and apparatus for generating composite images for displays are provided. For some embodiments, ray tracing algorithms may be utilized to efficiently generate a composite image corresponding to multiple views. Because ray tracing is done on a per pixel basis, it is possible to generate pixel values for only those pixels that will be allocated to a particular image view. By tracing rays from a viewpoint only through those pixels allocated to displaying images corresponding to that viewpoint, a composite image may be generated without discarding pixel data.
1. A method comprising:
generating, via a ray tracing algorithm, color values for a first subset of pixels of a display device allocated to a first viewpoint, the color values for the first subset of pixels based on a representation of a scene as seen from the first viewpoint;
generating, via the ray tracing algorithm, color values for a second subset of pixels of the display device allocated to a second viewpoint, the color values for the second subset of pixels based on a representation of the scene as seen from the second viewpoint, wherein the first and second subset of pixels of the display device comprise mutually exclusive pixels of the display device; and
forming a composite image of the scene based on the color values generated for the first and second subset of pixels of the display device.
2. The method of claim 1 , further comprising:
fetching at least a portion of the scene by transferring a portion of the scene stored in memory to a processor cache.
3. The method of claim 1 , wherein:
the first subset of pixels comprises a first set of vertical rows of pixels of the display device; and
the second subset of pixels comprises a second set of vertical rows of pixels of the display device interleaved with the first set of vertical rows of pixels.
4. The method of claim 1 , wherein the first and second viewpoints correspond to the left and right eyes of a viewer.
5. The method of claim 1 , wherein the color values for the first and second subsets of pixels are generated in parallel.
6. A system, comprising:
one or more processing devices;
memory for storing data representing a scene; and
an image generation component executable by one or more of the processing devices to generate a composite image of the scene for display on a display device by:
assigning mutually-exclusive subsets of pixels of the display device to corresponding viewpoints of the scene; and
generating color values for the corresponding subset of pixels of the viewpoints using a ray tracing algorithm,
wherein the composite image of the scene is based on the color values generated for the viewpoints.
7. The system of claim 6 , wherein the one or more processing devices comprises one or more graphics processing devices.
8. The system of claim 6 , wherein the viewpoints comprise at least four viewpoints, collectively forming at least two stereo image pairs.
9. The system of claim 6 , wherein the subsets of pixels comprise mutually-exclusive sets of columns of pixels of the display device.
10. The system of claim 6 , wherein the image generation component is configured to generate the composite image is as the color values for the subsets of pixels are generated.
11. The system of claim 6 , wherein the image generation component is configured to generate color values for the subsets of pixels in parallel.
12. The system of claim 6 , wherein the image generation component is configured to:
fetch a portion of the scene from the memory into cache of one or more of the processors prior to the generation of the color values,
wherein color values for a plurality of the subsets of pixels are generated while the portion of the scene is in the cache.
13. The system of claim 6 , wherein the subsets of pixels comprise mutually-exclusive sets of columns of pixels of the display device.
14. A non-transitory computer-readable medium having computer-executable instructions stored thereon that, when executed by a computing device, cause the computing device to perform a method comprising:
generating, via a ray tracing algorithm, color values for a first subset of pixels of a display device allocated to a first viewpoint, the color values for the first subset of pixels based on a representation of a scene as seen from the first viewpoint;
generating, via the ray tracing algorithm, color values for a second subset of pixels of the display device allocated to a second viewpoint, the color values for the second subset of pixels based on a representation of the scene as seen from the second viewpoint, wherein the first and second subset of pixels of the display device comprise mutually exclusive pixels of the display device; and
forming a composite image of the scene based on the color values generated for the first and second subset of pixels of the display device.
15. The computer-readable medium of claim 14 , the method further comprising:
fetching at least a portion of the scene by transferring a portion of the scene stored in memory to a processor cache.
16. The computer-readable medium of claim 14 , wherein:
the first subset of pixels comprises a first set of vertical rows of pixels of the display device; and
the second subset of pixels comprises a second set of vertical rows of pixels of the display device interleaved with the first set of vertical rows of pixels.
17. The computer-readable medium of claim 14 , wherein the first and second viewpoints correspond to the left and right eyes of a viewer.
18. The computer-readable medium of claim 14 , wherein the color values for the first and second subsets of pixels are generated in parallel.
19. A method comprising:
assigning mutually-exclusive subsets of pixels of a display device to corresponding viewpoints of a scene;
generating color values for the corresponding subset of pixels of the viewpoints using a ray tracing algorithm; and
providing a composite image of the scene to the display device based on the color values generated for the viewpoints.
20. The method of claim 19 , wherein the viewpoints comprise at least four viewpoints, collectively forming at least two stereo image pairs.