Quantcast
Channel: Questions in topic: "compute shader"
Browsing all 287 articles
Browse latest View live
↧

What does "Pass platform caps keyword defines to compute shaders" mean?

In the [2017.1.0 release notes][1] it says "Shaders: Pass platform caps keyword defines to compute shaders." What does that mean? [1]: https://unity3d.com/unity/what's-new/unity-2017.1.0

View Article


Compute Shader calculation time

Hi, how can I know for sure that from the moment I call: shader.Dispatch(kernelHandle, x, y, z); the next line the compute shader is done with the calculations? I mean, lets say I want to calculate...

View Article


How would you index a texture in a compute shader to matched UV coordinates

If you have a compute shader with 16 by 16 by 1 threads, run 32 by 32 by 1 times, for a texture size 512 * 512, how would you index that in a way that would match the UV coordinates of a texture. This...

View Article

How would I use compute shader with physics?

Hello, I've been trying to make a simulation game using particles but my main problem is how to make them collide with each other. About everywhere I've looked had something talking about compute...

View Article

How do I use compute shaders with particles?

Hello, I'm trying to make a 2D mobile simulation game that is entirely based on particles. It's meant to have different elements you can spawn that act in different ways, at the moment I made water but...

View Article


Accessing and writing depth on a render texture in compute shader

Hey, so this might seem to be a stupid question, but so far after a few days of trying to find this I have found only people who don't know how to do this or people who assume you know how to do this,...

View Article

ComputeBuffer low-level access in Direct3D 11 in Unity 5.5.0B3

Hi all, I just discovered **ComputeBuffer.GetNativeBufferPtr** in Unity 5.5.0B3. Very very awesome!! I'm trying to use the ID3D11Buffer with CUDA interop but it keeps crashing. When looking at the...

View Article

Geometry Shader is drawing triangles in wrong vertex positions

Hi, After learning about shaders in past couple of weeks, I wanted to try something on my own. So I tried to draw a face for a cube using Compute Shader and Geometry Shader. Compute shader is...

View Article


UVs are not mapped properly in my unity surface shader

Hi, I am trying to use compute shaders with surface shaders with dx11 tesselation shaders ( Using unity's distance base tesselation example from unity guide ). I copied the generated code from surface...

View Article


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 Article

confusing 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 Article

Strange 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 Article

RWTexture2D 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 Article


Computeshader 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 Article

Use 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 Article


Use 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 Article

Compute 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 Article


Compute 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 Article

How (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 Article

Calling 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 Article
Browsing all 287 articles
Browse latest View live