Skip to content
Project using WebCL and Raytracing
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Copy of WebCL_Raytracer.html


A Raytracer utilizing WebCL.
Written by Mark Becker
Kernel written by Mark Becker, Cameron Brown
    Project description
      This project was created to explore the usage of the newly developed specification WebCL.
      A previously built project OpenCL_Raytracer was used as the basis for this application.
      Like OpenCL, WebCL allows for direct access to the many-core environment of the CPU
      and or GPU.

      A ray tracer was developed and used to demonstrate the power of parallelization.

    Developed and tested on...
    • Mark's Desktop:
      • OS - Windows 7 Professional 64-bit
      • CPU - Intel Core i5 760 @ 2.80GHz
      • MB - ASUS P7P55D-E Pro
      • VC - ATI Radeon HD 5750
      • AMD App Acceleration SDK
      • Intel SDK for OpenCL

    Runtime Environment
      The easy part...
    1. This web application can only be run on Firefox browser
    2. The Nokia WebCL extension needs to be installed
    3. WebGL needs to be enabled
    4. WebCL needs to be enabled
      All of this can be checked and or installed at Nokia Research

      The not as easy part...
    5. AMD App Acceleration SDK installed - AMD Developer Central
    6. Intel SDK for OpenCL installed - Intel SDK for OpenCL

      The FAQ for Nokia Research's WebCL
    Runtime Environment Concerns
    • This application runs directly on the GPU or CPU. With that in mind, pushing the adjustments,
      size, run count, may effect the computer it is run on. There was more than a few times that
      during development the GPU was overflowed and needed to restart. It also may push the limits
      of Firefox.
    • Therefore, a certain amount of caution needs to be used. But don't be afraid to use it.

    Web Page Interface
Screen shot of page displayed:
Screenshot 1
Click for larger

    Choose Device:
    • The page creates a list of appropriate platforms and devices that can be used with the WebCL kernel.
    • Shown is both the Intel and AMD implementation of OpenCL.
Choose Device input section:
Screenshot 2
Click for raw image
    Choose Images:
    • There is three, preloaded, 'scene' text files of primitives that when used within the WebCl kernel will create the scene. Each scene, 1, 2, 3, creates a progressively more complicated image. With the increase of complicatedness, comes an increase in run-time.
    Move Camera and View:
    • When the scene is run at least once, the camera position and the viewing angle in the 3 dimensional realm can be changed. The 'Camera' set of adjustment buttons surround the cameras icon, and the 'Viewing Angle' buttons surround the eye icon.
Choose Image input section:
Screenshot 3
Click for raw image
    Adjust Run:
    • The 'Adjust Run' section of the input lets the user choose the final size of the image, 'Work Item' size, 'Trace Depth' and number of identical runs to average time-wise.
    • The width and height of the image need to be multiples of the work item [0] and [1] respectively. This is because the 'Work Items' in WebCL and OpenCL need to fit evenly into the global memory (screen size) allocated to the compute device.
Adjust Run input section:
Screenshot 4
Click for raw image
    Built-in Functions:
    • The 'Built-in Functions' lets the user choose the different functions that OpenCL provides.
    • OpenCL, therefore WebCL, allows for manufacturers to supply built-in, hardware based, functional units to handle some of the more common arithmetic operations. This should, in theory, increase the processing speed because the function is optimized for the hardware. Sometimes this is not the case. That is why the option is here, to test the differences.
Adjust Run input section:
Screenshot 5
Click for raw image
    Information Output:
    • The 'Information Output' is created after each run. The text is labeled to be self explanatory. Some of the information presented is based on the environment the code (kernel) is run on. The other info is specifically concerning the individual run(s) as in average run time.
Information output section:
Screenshot 6
Click for raw image
    Scene Created:
    • The largest section of the page is reserved for a displaying of the scene image created. The area is fixed to display a 800 by 600 image. Larger (and smaller) images can be created and scroll bars will be implemented accordingly.
Scene created section:
Screenshot 7
Click for raw image

    What is a Ray tracer?
      Ray tracing is a technique that generates an image by tracing the path of light through
      pixels in an view plane and simulating the effects of its intersections with virtual objects.
      Ray tracing is capable of producing an image of photo-realistic quality. usually higher than
      that of scan-line rendering methods. Unfortunately this level of realism comes at a greater
      computational cost.
    • More info from Wikipedia

    What is WebCL?
      The WebCL working group is working to define a JavaScript binding to the Khronos OpenCL
      standard for heterogeneous parallel computing. WebCL will enable web applications to
      harness GPU and multi-core CPU parallel processing from within a Web browser, enabling
      significant acceleration of applications such as image and video processing and advanced
      physics for WebGL games.
    • More info from Khronos

    What is Nokia Research doing?

You can’t perform that action at this time.