AMD Quietly Started an OpenCL Code Samples Page

OpenCL logo

Why? Maybe because there is currently only one code sample… 😉

AMD OpenCL Samples page is available HERE.

Currently the unique sample is about 3D volume rendering:

The sample renders a 3D volume box from a data file using ray casting. The data is loaded into 3D textures that are provided in OpenCL; these originally consist of a number of 2D slices representing a 3D volume. The normalized 3D texture data lies in a box between end points (0, 0, 0) and (1, 1, 1).

A camera and a near location is placed in –Z direction. For each pixel on the near plane, a ray is fired from the camera through the near plane. If the ray does not intersect the volume box, the kernel returns; otherwise, data is sampled using a fixed step size and pixel color. This data is accumulated using a linear blending equation.

Note – The sample works with other volume data available at The volume dimensions may have to be changed in the VolumeRendering.hpp as these are hardcoded to 256x256x256, according to the provided volume data aneurism.