Category Archives: Snippets

WebGL – Deferred Spotlight with Deferred Shadowmapping

There is a new demo at our redPlant demo section showing an WebGL based implementation of a deferred spotlight with deferred shadow mapping. It again utlitizes the three.js library. However if you are planning on doing deferred stuff with three.js, I highly recommend waiting for alteredqualia’s WebGLDeferredRenderer, which will include a more sophisticated integration with the three.js libary. You can follow the discussion on github.

WebGL – Deferred Pointlights. New demo and source released


the source of the previous demo as well as the new demo will be released over at the three.js forum soon.
You can follow the discussion here.

Happy deferred lighting!

CUDA Blur Filter – Something with a bit more meat…

The last post has been relatively short and was showing only a bit of skeleton code calling a simple kernel function from the host side via a wrapper function. This time I would like to post a snippet which actually does something. It is an example showing how to implement a basic blur-filter using the CUDA programming environment. In addition to the former snippet, this example also contains the missing parts showing how to allocate/deallocate device memory and how to transfer data from the host to the device and vice versa.

I figured that as subject for testing good old Lena would be suitable. Read more »

How to integrate CUDA and C++

Since I just installed the WordPress Plugin for using the Google Syntax Highlighter, I thought it would be a good opportunity to actually post a little bit of code in order to check it out.

For certain reasons I recently needed to wrap my head around integrating CUDA into an existing application that was written in C++. As mostly this turned out to be fairly easy, once you have discovered about ten ways how to do it wrong… Read more »