DirectX11 tagged posts

Unity3D ComputeShader Example

So I’ve been messing around with compute shaders in Unity3D for the past day and I thought I’d share some code to maybe help others get started. Unfortunately the documentation for this capability is abysmal, so there’s a few simple things worth noting to get it up and running. This is a DirectX 11 only capability so you’ll need to be building for windows if you want to get anything out of this. In this example I’ll be demonstrating how you can set up your compute shader so that you get a square set of points that move back and forth (z-axis). I got this working from some code that a Unity dev posted, which I’ve unfortunately lost the link for. It will look something like the following

Unity ComputeShader Moving Points

Unity ComputeShader Moving Points

It is of course not nearly as interesting as a screenshot.

Anyway here’...

Read More