Skip to main content
0 votes
1 answer
27 views

Compute shader occlusion test only works with scene camera

Using Unity 2022.3.40f1 and URP. I'm trying to implement occlusion culling with the depth buffer in a compute shader. I don't know what's wrong here but my code only works fine with the scene camera ...
Buttermilch's user avatar
0 votes
1 answer
34 views

Raymarching compute shader error in Unity VR

I am trying to apply a raymarching shader to my Unity VR project. It is supposed to apply a shader to particles that represent a fluid using Smooth Particle Hydrodynamics. However, I am running into ...
pa87901's user avatar
  • 11
0 votes
0 answers
52 views

Smoothing normal on GPU (using geometry shader) without knowledge to adjacent faces

Smoothing normal on GPU might be a common question because you really can generate flat normal by triangle primitives , but you don't have adjacent faces so it is not possible to smooth normal . I ...
De Loris's user avatar
0 votes
0 answers
19 views

Perform multiple lines in atomic way in compute shader

I am implementing a marching cubes algorithm in Unity using a compute shader. In my current implementation all the necessary data is stored in RWStructuredBuffer's with a theoretical maximum size. The ...
Ben's user avatar
  • 21
1 vote
0 answers
28 views

Metal Compute Shader Incorrect Output

I am writing an FFT in GLSL and compiling to MSL using glslang and SpirvCross to support macOS. The code works fine on Windows with GLSL, but on Metal I see output that makes no sense. However, I have ...
James51332's user avatar
0 votes
0 answers
21 views

Unity: Set a mesh directly on the GPU

In unity I'm constructing a mesh on the GPU. Currently, I have to write the vertices / indices back to the CPU before setting them again in the mesh. This is very inefficient and takes about 90% of ...
Jimmy Diddler's user avatar
1 vote
0 answers
20 views

Unity compute shader thread syncing issue

So I am writing a marching cubes compute shader. It’s going reasonably well and does work. I am in the processing of modifying it to remove all duplicate vertices. I want to do this in the shader. I ...
VVJ21's user avatar
  • 11
1 vote
0 answers
46 views

Why did my optimization of compute shader cache hit ratio have the opposite effect?

I wrote a compute shader in ue4 that each thread needs to get the value of a structured buffer corresponding to its own id.As shown in the figure below, for example, my texture is 8x8, the thread ...
Jarvan Du's user avatar
0 votes
0 answers
37 views

WGPU compute shader inexplicably returns no data

I have a wgsl compute shader, that essentially checks pairs of datapoints and counts the number pairs that meet a certain requirement (passes(i,j) is true) for each point. (ie. if there are 5 passing ...
Bagel03's user avatar
  • 715
3 votes
0 answers
88 views

Can I use a GPUBuffer which is the output of a compute shader as a Three.js or Babylon.js vertex position buffer?

I am experimenting whith webgpu. I found out that transferring data between cpu and gpu can be quite slow. My goal is to simulate particle physics on the gpu using webgpu's compute shaders, then use ...
Victor's user avatar
  • 678
0 votes
0 answers
34 views

Is it better to have multiple small textures or one large texture as input texture for compute shader?

My goal is to use 5 1080x1080 textures and use the algorithm in the compute shader to generate a new 1080x1080 texture. Each pixel will most take the colors of 16 adjacent pixels from the same input ...
Jarvan Du's user avatar
0 votes
1 answer
74 views

How do I achieve the ping-ponging technique in HLSL compute shaders?

I am doing a fluid simulation, and implementing such simulation with the CPU is very slow, especially when the simulation grid size gets bigger or is a 3d grid. So I used shaders to get the ...
Mohamad T Shehab's user avatar
0 votes
0 answers
75 views

Unexpected results from Metal computing

EDIT: In the comment below, pmdj pointed out 2 bugs in my code. For clarity, I will not copy all the code and output buffer contents. Instead I modified both and left the originals as comments. ...
Reinhard Männer's user avatar
1 vote
1 answer
155 views

Is this WebGPU compute shader badly designed?

I am having unexpected results while comparing a WebGPU compute shader with it's cpu equivalent. This is a CPU version of a function that does Verlet Integration for simulating particles. ...
Victor's user avatar
  • 678
0 votes
0 answers
29 views

How to retain bits on lowp float when using `imageLoad` and `imageStore`

I would like to use all 8-bits as flags on a lowp float stored in an image. However, for some reason the data is never retained when I read it back. I use uintBitsToFloat and floatBitsToUint like so. (...
Griffort's user avatar
  • 1,224

15 30 50 per page
1
2 3 4 5
40