Android Crash on UpdateComputeBuffers in libunity.so
**The Problem** I have a bunch of ComputeBuffers and RenderTextures in my 2D game, and up until recently, they were working just fine. Now, all of a sudden I am seeing crashes after the Start()...
View Article3D array flattening / unflattening to / from compute shader
Hello, I'm currently using compute shaders to compute 3D arrays of voxels and I'm experiencing some kind of "reversed" 3D coordinate issues, i.e X and Z coordinates seem to be reversed. I am suspecting...
View ArticleHistogram Texture Mapping in a Compute Shader
I'm trying to do histogram matching between 2 images, so I want to do a mapping in order to specify the destination texture histogram. Is there any way to solve my problem? Here is the compute shader...
View ArticleCallback when (compute) shader is reloaded
When you change the source of a shader during Play mode, Unity recompiles and hot swaps the shader. Unfortunately, it looks like compute shader properties are not restored after the hot swap. The...
View ArticleExport android with compute shader doesn't work on unity 2018
Hi everyone! I make a little application to use Compute Shader on Android. In unity, 2017 and more, it's work fine. Export unity for android works perfectly on 2017.3.0p3, but it doesn't work on...
View ArticleVisual Studio Community on Mac will not recognize HLSL
I use Visual Community on Mac with Unity, and what to edit HLSL shaders. I find that I get some syntax colour highlighting, if I use ".compute" or ".cginc" (but not ".hlsl") file type suffixes, but no...
View ArticleGPU instancing and collision detection in flocking behaviour simulation
Hello! I am working on a project that requires me to simulate flocking behaviour. **CPU calculations can't get me far enough** My current approach calculates the flocking using the CPU, which maxes out...
View ArticleHow do I generate and compile a compute shader in the editor?
I'm working on an editor extension for a custom GPU particle system. The system generates source code for a compute shader, and I need to turn that source into a ComputeShader instance. Basically, I'm...
View ArticleWater & Fabric compute shader
I am new to compute shaders, and would it be possible to create a compute shader to make a particle-based, physically affected object that acts like water (maybe with a range that allows you to specify...
View ArticleHow to use compute shaders to make some calculations instead of the CPU ?
Hello, I would like to use my GPU to perform some tasks instead of the CPU. Indeed, my program needs to perform A LOT of small operations, and it is rapidly saturated and slows down a lot.... So I...
View ArticleHow to measure the compute shader execution time of the coresponding kenel?
I know the GetData() will block the main thread to fetch data from GPU. But in my realization code, the data arrays are encoded into a render texture and pass to the vertex shader for render. which way...
View ArticleBaking position data onto a render texture
Hi ! I have been searching the net for quite a while now but I cannot get any information on how to bake position data(float x,y,z) onto a render texture ? Also which format should the render texture...
View ArticleCalling DispatchCompute from a command buffer removes its render target?
When using DispatchCompute in a command buffer, the render target set using SetRenderTarget is removed. This is unfortunate, since in my use case this means a large increase of render context switches,...
View ArticleHow do you load a ComputeShader in code without using the Resources folder?
I need a way to load a ComputeShader, in code, without the use of a Resources folder. I'm working on a EditorWindow plugin that requires the use of a ComputeShader. This ComputeShader is only intended...
View ArticleUnity compute shader is blocked or not after Dispatch kernel?
compute shader Dispatch kernel is synchronous or asynchronous?
View ArticleCompute shader vs CUDA wrapper
Hello everbody! I want to explore GPU computation within Unity. I found a variety of possibilities how to do this. When using ComputeShaders in Unity, should I expect much overhead when applying the...
View ArticleCompute Shader crashes when buffer is too big
I am trying to manipulate arbitrary data taking advantage of the parallelism offered by compute shaders. I've set up an example scenario to mess around and do some experiments. In particular what I'm...
View ArticleTips on debugging compute shader
I'm following [this tutorial][1] for making 3D perlin noise, but decided to have a go at compute shaders and use that for the calculations. ![alt text][2] This part of the code takes the values i0 and...
View ArticleUsing compute shader, how to take every vertex of a mesh and make a cube...
Here is a script I currently have for object Emptsh to use a compute shader for making a point appear on a screen where every vertex on the BoyMesh mesh is. Now I'm trying to, instead of make simple...
View ArticleHow to destroy terrain using Sebastian Lague's Marching Cubes implementation
I have created a voxel engine in the past but have never been able to get marching cubes quite right, and Sebastian Lague recently created his own using marching cubes. The problem is that he is useing...
View Article