I can't seem to get my compute shader to work

Godot 4.2.1 C#

Hello! This is a bit of a vague question, but basically, I have a compute shader, and a dispatcher. The main issue I’m having in generating anything but a blank transparent texture. The dispatcher uses a custom helper class which I basically translated from this repo into C# (GitHub - Tymec/EasyCompute).

Basically, the main issue I’m having is that when it comes time to receive the texture back to the script, the only thing it returns is 0s, which leads to a full transparent image, when ATM, I have placeholder code in the shader which should generate a completely white texture. I’ve also compared the code of the shader and dispatcher to the heightmap demo project, and can’t find anything glaringly different to cause this, as this demo works on my computer. There are no errors generated, and I tried a more manual style coding to the dispatcher instead of using the helper and got the same results.

I know this is a bit of a big thing to navigate, but I’d appreciate any help given. Here is a project with code ported directly from my game, sorry about the slight maze of dependencies.

SOLVED: After tweaking things, I figured it out. Notice to anyone else, remember to limit your invocations per work group to 1024 if your compute shaders aren’t working.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.