Skip to main content

Questions tagged [compute-shader]

Filter by
Sorted by
Tagged with
0 votes
2 answers
141 views

I was working on this idea of drawing a cone rotating on the y axis with a parametric equation, using a compute shader with a function like: ...
philB's user avatar
  • 333
2 votes
0 answers
99 views

I'm creating voxel planets using Marching Cubes (MC). To handle nearby (high-resolution) and distant (low-resolution) blocks, I use an Octree data structure. NOTE: The implementation uses compute ...
Light's user avatar
  • 21
0 votes
1 answer
288 views

I'm trying to get a very basic Compute Shader to write to a Texture2D and render its result to screen. so far I have written this code to bind UAV to Texture2D and pass that to my Compute Shader. but ...
NotAlfred's user avatar
0 votes
0 answers
273 views

I am trying to generate the height gradient (the slope) for a heightmap of mine using a compute shader in Unity, and the result has weird ringing artifacts and I completely lost what could be wrong. I ...
Keksoskajoska's user avatar
0 votes
0 answers
101 views

I've been working on a C++ game engine for a while, but I decided to scrap the project because doing it in C++, despite my best efforts, I could feel the technical dept building. As such, I switched ...
Spencer Rosas-Gunn's user avatar
1 vote
0 answers
83 views

I am trying to build a compute shader to retrieve pixel color values from a noise-generated image using GLSL and Godot 4.2. The image itself is a 3840 x 2160 and formatted in RG8. I would expect ...
Haruto Kaito's user avatar
0 votes
0 answers
107 views

I've written a C# code and Compute Shader that makes frustum culling and it works correctly but it makes the grass flicker. I can't figure out what is behind this issue so I'm asking here. Does ...
Leedy's user avatar
  • 1
0 votes
0 answers
400 views

I'm working on a little project for a while - creating an area where you can spawn a bunch of grass. I've overcame a major headache when figuring out the GPU instancing for the mesh and the code looks ...
Leedy's user avatar
  • 1
0 votes
0 answers
63 views

In order to apply the metaball effect on a pixel in the Dest RenderTexture, I need the minimum distance to every game object that is involved in generating the metaball effect for that pixel. This ...
rasputin's user avatar
1 vote
0 answers
129 views

I am looking to achieve the following: I have a compute shader that receives a Texture2D as input, where a small percentage of the pixels in the texture are white. ...
Daniel Cardin's user avatar
1 vote
0 answers
41 views

I'm implementing an algorithm called Fast3x3 SVD on my compute shader. However, while I was debugging my compute shader in RenderDoc, I noticed some assignment operators were completely getting ...
ThisAccountIsForGameDev's user avatar
0 votes
1 answer
669 views

My generated terrain chunks have gaps between them: I'm using Compute Shader and Simplex Noise from FastNoiseLite library to generate noise: ...
aress's user avatar
  • 21
1 vote
0 answers
53 views

I'm generating a 3D terrain chunk based on Simplex Noise and Marching Cubes algorithm to create mesh. My chunks have global coordinates (x,y) e.g: (0, 1), (-1, 1)... Noise is generated using Compute ...
aress's user avatar
  • 21
0 votes
0 answers
501 views

I have a Compute Shader which uses InterlockedMin() and InterlockedMax(). The Compute Shader works very well on my PC (AMD ...
Suratraak's user avatar
  • 101
0 votes
2 answers
128 views

I have a problem with converting my pixel shader to compute shader. The error is in this piece of code: ...
philB's user avatar
  • 333
0 votes
0 answers
72 views

I am trying to implement MSAA in my very simple raytracer. However, when I do, my program gets and insane slowdown. I am working in Metal, and on the Metal HUD, I can see that my frametimes drop from ...
oli2's user avatar
  • 3
0 votes
1 answer
240 views

I have been working on a metaball compute shader for roughly 3 months now, and the only issue I have to resolve is noise in the output Dest[id.xy]. I also asked GPT 4 about the crux of the issue and ...
rasputin's user avatar
0 votes
1 answer
694 views

I'm attempting to create a mesh using compute buffers in Unity(2022.2.11). So far I've got the mesh rendering however parts of it periodically flicker frame to frame. I'm assuming I've done something ...
Hex Crown's user avatar
1 vote
1 answer
681 views

Firstly I am in Unity 2021.3.11f1 using DX12. So the situation is the following. I have a large 3D RenderTexture, and I have a large 3D Texture3D with the same data, same format, same dimensions, same ...
Pjbomb2's user avatar
  • 11
0 votes
1 answer
381 views

I'm currently trying to show a galaxy and have developed a compute shader that places/moves "stars". Another vertex/fragment shader reads the buffer and currently places a point at each ...
Basic's user avatar
  • 1,287
0 votes
1 answer
220 views

I have 4 rendertargets R10G10B10A2 each being used to store color and normal in a compact double RGB 555 bits format. When I'm doing the lighting pass I'm obliged to have extra rendertargets because ...
philB's user avatar
  • 333
0 votes
1 answer
559 views

I'm trying to move a 262,144 [2^18] points (stars) in a compute shader and am struggling to reliably address the data in a buffer. I understand that there's a 3-dimensional array ...
Basic's user avatar
  • 1,287
2 votes
2 answers
1k views

I'm trying to create a compute shader that will generate and manage the movement of a point cloud. The shader needs several thousand points to work on and I want to pull back the first dozen or so. ...
Basic's user avatar
  • 1,287
2 votes
1 answer
4k views

I am using Unity to send two types of data to the Compute Shader: A struct: struct Flock { public Vector3 position; public Vector3 velocity; } And an ...
Aaron Z's user avatar
  • 143
0 votes
1 answer
248 views

I want to comiple a compute shader from text, but it failed with 0x8e16d728 error. ...
Xinggang Li's user avatar
0 votes
1 answer
527 views

I was in the process of creating a function in my compute shader that converts a 180° angle to a 360° CCW angle like this: ...
Keheck's user avatar
  • 31
0 votes
0 answers
142 views

I'm having a RWStructuredBuffer called AffectedVertices give me random data instead of 1 simple value to resultAffectedVertices, ...
TensaDev's user avatar
1 vote
0 answers
376 views

I'm experimenting with compute shaders in Unity. A pretty typical thing you wanna do is marshal a buffer of structs back and fourth between C# and HLSL land. Ordinarily you'd have to manually define ...
Charly's user avatar
  • 752
0 votes
1 answer
511 views

I'm creating my own terrain terrain system for Unity using marching cubes but I've run into a problem I'm stumped on. First I'll explain how it works: A compute shader creates an array of points ...
Leo's user avatar
  • 1
0 votes
0 answers
183 views

I'm hoping to learn what my options are for sharing the outputs of simple unlit shaders with compute shaders that will operate on the data. Is my only course of action to use a render texture with the ...
Li Brary's user avatar
2 votes
3 answers
4k views

At first I thought that ComputeBuffer's could only be used in compute shaders and that GraphicsBuffer's could only be used in ...
Bartimaeus's user avatar
2 votes
2 answers
1k views

I'm currently working on a dual contouring implementation for which I want to create procedural terrain based on layers of noise. Both, the terrain generation and the mesh creation via dual contouring ...
Tuntenfisch's user avatar
0 votes
1 answer
366 views

I'm currently trying to implement smooth voxel terrain (using dual contouring) with mesh generation happening on the GPU and I'm struggeling with chunked level of detail creation. My approach is as ...
Tuntenfisch's user avatar
1 vote
0 answers
1k views

I have a game with massively parallelizable logic, which I intend to write calculate on the GPU (Java/LibGDX). I am planning to implement a logic for it through a fragment shader, instead of a compute ...
Dávid Tóth's user avatar
0 votes
3 answers
774 views

I am using Unity with a compute shader to render to a texture. So far I have been checking points along the rays in units of 1 just for testing, so I know it works. Now I am simply trying to write a ...
Tristan367's user avatar
1 vote
0 answers
548 views

I have a snow particle system and I use simplex noise for creating turbulence effect. At first, I made calculations on the CPU, and the simplex noise calls obviously were the bottleneck. The ...
Dmitry Kozlov's user avatar
2 votes
1 answer
664 views

EDIT Per request I've provided a simple compute shader that reproduces the problem. The compute shader below is kind of a contrived example meant to compute the rolling average over an input ...
Tuntenfisch's user avatar
2 votes
0 answers
543 views

I am running into a problem with a compute shader I am writing to generate the vertices and triangle indices for a voxel generated mesh. Currently, I am creating an ...
Tom Himler's user avatar
0 votes
0 answers
758 views

I have a very large texture which I want to fill with values representing "distance in units from a river tile". The texture is already seeded with these origin river points (meaning ...
KaiserJohaan's user avatar
  • 1,464
1 vote
0 answers
126 views

I'm receiving a C9999 (*** exception during compilation ***) linker error for an OpenGl 4.6 compute shader. It seems to be related to the number of SSBOs I have declared (14 separate declarations), ...
gdevi's user avatar
  • 11
3 votes
2 answers
2k views

I'm pretty new to compute shaders and shader writing in general. I'm trying to write a compute shader for a procedural generation project I'm working on, it's purpose is to blend biomes together. The ...
DBurn's user avatar
  • 33
2 votes
0 answers
69 views

How would one proceduraly generate a star in a compute shader that looks like one of thes two at any size needed. Also any way transfer this into a spherical map, would be appreciated. Goal is to ...
chief65's user avatar
  • 21
0 votes
1 answer
341 views

I am working on a game where I have to mix colored liquids as shown here. I am working with a plugin (StableFluids) to get this effect: Effect Problem: The shaders used in the plugin are able to ...
Naresh's user avatar
  • 129
2 votes
1 answer
3k views

What I try to achieve is a fog of war system for 3d top-down stealth game. I have searched the Internet and it seems that behavior I want to achieve can be done by using secondary camera that is ...
Zekko's user avatar
  • 21
0 votes
1 answer
10k views

I am trying to follow this excellent Coding Adventure: https://www.youtube.com/watch?v=lctXaT9pxA0 in order to get a very simple mesh deformation on a mesh using a compute shader. I'm getting an error ...
Glen Pierce's user avatar
2 votes
0 answers
669 views

I am doing add with a compute shader. All input-output data are stored in VkImage, the format is VK_FORMAT_R32_SFLOAT. In the shader, the corresponding layout is r32f. I have two questions about this: ...
whoami's user avatar
  • 31
1 vote
0 answers
960 views

The NVIDIA Direct Compute programming guide lists some best practices for memory management on the GPU. One tip they give on page 8 ("Structured Buffers") is to use a 'structure of arrays' (SOA) ...
otoomey's user avatar
  • 196
1 vote
1 answer
849 views

I have written an erosion simulator that I want to execute from the editor (for generating terrain and such outside of play mode). Unfortunately, when I crank the parameters on my simulation, unity ...
otoomey's user avatar
  • 196
1 vote
1 answer
181 views

I have a depth buffer and color buffer created by another effect. The buffer is more than double my screen size. It is not rendered from geometry, but as a whole it resembles a rendered scene with an ...
user1920703's user avatar
0 votes
0 answers
234 views

How will lots ComputeBuffer instances affect performance? And why? I know that I should call ComputeBuffer.Release() on every <...
Ely Shaffir's user avatar