ABSTRACT

This chapter presents an original Graphics processing units ray-tracing application running solely on the compute shader and Shader Model 5.0 in DirectX 11. It describes a step-by-step ray-tracing implementation in the compute shader using Shader Model 5.0 in DirectX 11.0. Ray tracing is an advanced illumination technique that simulates the effects of light by tracing rays through the screen on an image plane. Ray tracing is traditionally known to be a trivially parallel-implementation problem given that the color computation for each pixel is independent of its neighbors. The application includes the most-used effects in ray tracing and allows programmers to add their own code or to modify the existing code in order to improve the visual effects and their performance. One of the main characteristics of the compute shader is that it “is not a part" of the pipeline. The shader computes the pixel color just as if the current intersected primitive had the current-material-to-render attached to itself.