Quantcast
Channel: Questions in topic: "compute shader"
Viewing all articles
Browse latest Browse all 287

How do I instantiate a Compute Shader

$
0
0
Say I have a Compute Shader asset "ComputeParts.compute" and a game object "MainObj". MainObj has a member (C#): ComputeShader computeShader; Now, how do I assign an instance of ComputeParts.compute to this variable? I cannot seem to attach the shader to the object in the Editor in any way. Obviously, since it's a compute shader, I cannot assign it to the object's material either, as I do with other shaders. The manual just says "define a variable of ComputeShader type, assign a reference to the asset" - but I have no idea how to do that.

Viewing all articles
Browse latest Browse all 287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>