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

Does it impact the performance if I use multible Threadgroups instead of one in a Compute Shader

$
0
0
Hi. I've been doing calculations with a compute shader and I stumbled across the issue that the thread size has to be a fixed value and can't be changed at runtime (at least I think). I got around the issue by using a thread size of 1 and instead using multible threads. I was wondering if that impacts performance and how to get around it. Compute shader: //Thread size of 1 [numthreads(1,1,1)] void DoStuff(uint3 id : SV_DispatchThreadID) { //DoStuff } Run the shader: void runShader(int numThreadsPerAxis){ //and instead multible thread groups here DoStuffShader.Dispatch(0, numThreadsPerAxis, numThreadsPerAxis, numThreadsPerAxis); } Thanks for the help and sorry for the bad explanation.

Viewing all articles
Browse latest Browse all 287

Trending Articles



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