|
Bounding Volume Hierarchy |
|

The bounding volume hierarchy is one of the sample applications bundled with the download of OpenCL Studio. A number of kernels are used to construct a bounding volume hierarchy (BVH) of a triangle mesh entirely on the GPU. In this demo the BVH is used to compute the collisions between a fluid consisting of 32,000 particles and a container consisting of several thousand triangles. Additional OpenCL programs are used for radix sort and to construct a 3D Morton curve. You can also find a video of this simulation on youtube. |
|
|

The Fluid rendering is one of the sample applications bundled with the download of OpenCL Studio. The fluid is computed via by the smoothed particle hydrodynamics algorithm in the libCL parallel algorithms library. Numerous framebuffers and shaders compute surface normals, fluid depth, screen space distance as well as the deferred lighting necessary to render a realistic translucent fluid. Additional OpenCL programs are used for bilateral and Gaussian smoothing. You can also find a video of this simulation on youtube. |
|

The particle system demo consists of a complex OpenCL program containing a number of different kernels to sort, collide and integrate the 16384 bodies in the simulation. The positions and velocities are stored in OpenGL vertex buffers which are then rendered as a point sprites. The buffers are shared with the OpenCL kernels that compute the rigid body dynamics, avoiding an expensive buffer copy between OpenGL and OpenCL. Despite the number of kernels involved, the simulation runs at the maximum 40 fps limit imposed by OpenCL Studio.
|
|

The N-Body simulation is one of the sample applications bundled with the download of OpenCL Studio. Vertex and attribute buffers of a point set are used to render and store the 16,384 bodies in the simulation including the position, mass and velocity of each particle. In this particular demo, the OpenGL buffers containing the points have not been shared with OpenCL and are instead copied every frame to OpenCL buffers via the host device. Despite the expensive memory copy, this application still runs at over 30 fps. This demo also includes an interface to experiment with different initial conditions, time scales and damping forces. |
|
|
|
|
|