DirectX 11 Compute Shaders Experiments

4 comments

For 6 months now I try to generate a huge amount of particles and interact with them physically. I learnt a lot with OpenGL, GLSL and C++ and I tried many experiences by encoding data in textures and compute these data on GPU.
This is a barbarian alternative technique to compute stuff with the GPU but it was quite convincing before the birth of computing languages because it runs almost everywhere as soon as the platform supports OpenGL 3.0 (never tried under OpenGL ES 2.0).

My goal then was to be able to use that kind of power in Unity but I got stuck to port it.
The reason is simple: Unity does not support ARGB32F texture format. Impossible to store 32bit floats in a Texture2D.
Then I looked to CUDA and especially OpenCL to analyze the possibilities to build a plugin for Unity with my colleagues.
And here comes Yves Ducreuzet and his convincing arguments and experiences on DirectX 11 Compute Shaders.
I got shocked!
Impressively easy to understand and already implemented in Unity 4.x, this is the most beautiful and easiest way to use your GPU to compute data.
Much more easier than implementing CUDA SDK or OpenCL in a plugin.

The only thing is you better learn to port your GLSL to HLSL and yeah… it is Windows only because of DirectX.

There are some tests here but sorry I still have bugs with interacting colliders in the second part of the video.

QDirectX 11 Compute Shaders Experiments

4 comments

Join the conversation
  • Umut - January 28, 2014 reply

    I wonder, do you send me source code? I’m work on like this project but i’m not finalization my project…

    Quentin Lengelé

    Quentin Lengelé - March 20, 2014 reply

    One of my friends has source code ready to be read 😉 here:
    https://www.youtube.com/watch?v=gJyqMTeKcm0
    In the info text.

  • Steve - February 13, 2015 reply

    This is pretty awesome. I checked out the link, but it leads to a 404. Did you pull this or is it available somewhere else?

  • Amit - April 16, 2015 reply

    a huge fan of your work 🙂
    could you please suggest a good read on compute shaders, I’ve read a few books but still couldn’t appreciate what compute shader can do
    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *