Questions tagged [compute-shader]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer
926 views

Solving a recursive problem in the geometry (or any other) shader

I would like to calculate an effect of an external force on a binary tree (wind on a tree). It's a recursive function - take a (parent) node and calculate the angle to rotate all of the nodes "...
Karlovsky120's user avatar
1 vote
1 answer
4k views

Using a Compute Shader in Unity to convert a texture to a float array

I have a fairly simple requirement for a compute shader (DirectCompute through Unity). I have a 128x128 texture and I'd like to turn the red channel of that texture into a 1d array of floats. I need ...
EmmetOT's user avatar
  • 121
0 votes
1 answer
1k views

Vulkan Storage Buffers, loss of data

I have been passing glm::vec3's in an array to a storage buffer to be processed by a compute shader, but once it has been modified I am getting some malformed data back. Shader ...
0xen's user avatar
  • 453
2 votes
2 answers
6k views

Pseudo random number generation in compute shader

Using a C# script in Unity3D to control a HLSL compute shader, I'm trying to generate pseudo random numbers on the gpu. Following along with GPU Gems 3 Hybrid Tausworthe method and another thread ...
slanden's user avatar
  • 121
0 votes
1 answer
135 views

Get VertexSize of Instance in VertexShader

I'm using Unitys DrawProceduralIndirect function to directly render the content of a ComputeShader. I setup the argumentBuffer for this function as follows: <...
Christoph's user avatar
  • 135
1 vote
0 answers
1k views

Passing an UAV to a Pixel Shader in DirectX11

I have a compute shader which task is to take an input image and then blur it using a Gaussian filter approach. The input and output for the compute shader looks like this: ...
Riggs's user avatar
  • 69
0 votes
1 answer
201 views

Why does my triangle ray intersection test always return -1.0f?

I'm trying to get the mouse click position on a terrain geometry, but multiple times in each frame; doing it on the CPU was way too slow, so I'm trying to do it with a compute shader. I can't seem to ...
Varga Csaba's user avatar
1 vote
1 answer
720 views

Batch/Combine multiple Graphics.DrawProcedural-Calls in Unity

I have multiple calls to Graphics.DrawProcedural in my Unity-project. E.g. I'm drawing 1000 procedural geometries that share the same material and get their ...
Christoph's user avatar
  • 135
0 votes
1 answer
210 views

In theory, would an erosion algorithm compute faster on a GPU than CPU?

I'm planning to port an erosion algorithm from CPU to GPU, in theory, will it be faster or would it be better to multi-thread it on the CPU? The algorithm has quite a lot of if statements and loops ...
Werem's user avatar
  • 148
2 votes
1 answer
359 views

How to sort tiled decal list?

I have a tiled forward render pipeline (also called forward+). It assigns a list of lights for every 16*16 block of pixels (tiles) on the screen. Lights are accumulated additively so their order doesn'...
János Turánszki's user avatar
1 vote
1 answer
380 views

DirectX shader - how to spread raytracer computation over multiple frames?

I'm playing around making a shadertoy style SDF raytracer in HLSL and to make it run faster on high resolutions (1080p and up) I'd like to spread the computation over multiple frames. Right now I ...
Spectraljump's user avatar
2 votes
0 answers
468 views

RWTexture3D in Compute Shader on Intel HD 4000

I'm having some weird issues running a Compute Shader with DirectX 11 on an Intel HD 4000 GPU. The goal is to write different shapes into a DXGI_FORMAT_R32_FLOAT 3D Texture with a size of ...
Lukas F.'s user avatar
  • 121
15 votes
1 answer
374 views

Flowing GPU compute water

I have a civil engineering background and perform hydraulic and hydrologic analysis' regularly. They sell degrees for that sort of thing, but it's really not rocket science. I recently got it in my ...
Jon's user avatar
  • 3,684

1
2