Indexing an array thousands of times per frame
I have an array that is 60 by 60 by 60 filled with Vector3 wind data. What I am trying to do is visualize how the wind is flowing with arrows that move around the scene. Right now there is too much...
View Articleconfusing compute shader results
I have a compute shader that generates only positions for my geom shader to build cubes. The compute shader has 4 by 4 by 4 threadGroups and a group size of 1 by 1 by 1. So there are 4*4*4 positions...
View ArticleStrange behaviour on compute shader
I've written a small compute shader that spit out positions for my geom shader. The threadGroup size is 4by4by4 and the group size just 1. So I get 4*4*4=64 positions where my geom shader have to...
View ArticleRWTexture2D in Compute Shader on Android?
**I am trying to use [this asset][1] to test out a compute shader on android**, that allows texture modification. I'm new to shaders, I could have misunderstood or not realizing some kind of limitation...
View ArticleComputeshader array output
Hi Everyone, is it possible to output for example 8 vertices in output buffer using array in C#, but not using unsafe or fixed struct? for example, look at this code: struct outData { public float sdf;...
View ArticleUse of compute shader in coroutine freeze the rendering threads
I'm currently working on a learning AI based on the Double DQN algorithm. As the code is huge and I couldn't find which part of the code is bugged, I'll first described the system. I'm working on a...
View ArticleUse compute shader to go RGBA to RGB
Is it possible to write a compute shader that can convert an RGBA image to a RGB image? I am new to HLSL and I cannot find a type of byte or uchar to make a structured buffer like...
View ArticleCompute Shader compile error from Texture3D.Sample()
I'm trying to sample a 3D noise texture that I generate elsewhere and pass to my ComputeShader. However, when compiling the following, all I get is "Shader error in 'DensityGenerator.compute': cannot...
View ArticleCompute shader FindKernel() fails with unity exception
So the shader code is here: http://pastebin.com/Tbgu7UvH And the script is here: http://pastebin.com/r19BV1Rh If I try to find the only kernel that I have, I get this: Kernel 'CSMain' not found...
View ArticleHow (Or Why) to use Consume Buffers safely on arbitrary data lengths
Hey guys, I wanted to use compute shaders to write object position into a texture, then manipulate the texture and sometimes read a value back from the texture. To avoid too much stalling, I wanted to...
View ArticleCalling Graphics.DrawProcedural multiple times for chunked procedural terrain
In my project, I'm creating chunks of 3D procedural terrain (voxels) using a series of compute shaders and then passing the vertex data of each chunk from a ComputeBuffer to the Graphics.DrawProcedural...
View ArticleCompute shader on UWP
Hi everyone, I have some difficulties on running a very simple test compute shader on UWP. As a base I have a very simple shader and script running just fine on a Quad in my Unity editor (5.6.0f3). But...
View ArticleHow to build for Mac to make compute shaders work?
The problem is that even though 5.6 supposed to compile compute shaders for Metal, it didn't work for me. I created a simple project: compute shader is used to render a fractal. Then I just made Mac OS...
View ArticleImplementation of GPU Flocking?
Hi, I'm new to Unity and Compute Shaders. I'm trying to implement GPU Flocking using compute shaders in Unity to show that GPU Computing is faster than the CPU . I've managed to write a script and...
View ArticleSystemInfo.supportsComputeShaders always false on Android
Hello, I'm trying to get compute shaders to work on Android but SystemInfo.supportsComputeShaders always return false when my target platform is Android. When I select Windows as my target platform, it...
View ArticleUpload list of textures to the GPU to be used with compute shaders ?
Hi, i need to collect ( have no problem with this ) and upload all the textures used in a scene to the GPU memory. ComputeShader.SetTexture() can set a single texture only. Is there any way of loading...
View ArticleHow does one do compute shaders(with particles)?
So, this is my first attempt at compute shaders and I'm quite lost... ANY help or referral is higly appreciated. ---------- My goal is to achieve an effect that I've only been able to identify as...
View ArticleCompute shaders not working in editor but working on device
I have started learning compute shaders. And I found a really good project on github (https://github.com/antoinefournier/XParticle) that would help me learn and experiment with compute shaders. As I...
View ArticleHow to write to a RenderTexture as a cubemap
So after a lot of digging I found RenderTexture.isCubeMap. Then I found that it was obsolete. Then I found RenderTexture.dimension and, by extension, UnityEngine.Rendering.TextureDimension.Cube which...
View ArticleHow to disable Warnings in Compute Shaders ?
Hi, We are using Compute Shaders in our project and doing quite a lot of math operations. A warning is always generated : ***"Shader warning in 'VertexGenerator.compute': integer divides may be much...
View Article