godotengine/godot-demo-projects

There should be a compute shader demo with more features

Closed this issue ยท 7 comments

Both the compute shader heightmap demo here and the compute shader tutorial are really, really limited in what they show. None of them show how to use a uniform that isn't a buffer, none of them go into depth on how to use the different layout() flags, etc. This could be done in the docs, but I think a proper demo that you can interact with would be very welcome. I'm struggling to find info because I wouldn't even know where to start - especially regarding the GDScript side of things.

This is pending on having more features added to RenderingDevice, such as godotengine/godot-proposals#6989. Right now, not much is shown in the demo because what it can do efficiently is pretty limited.

We could add a non-buffer uniform example though, such as a float that adds a threshold value to the noise (discard pixels lower than the threshold). Feel free to open a PR for this ๐Ÿ™‚

@robbertzzz the problem with demos is that we need to walk a fine line between showing something that can be understood, and overloading someone with a complex example where you no longer see the wood for the trees. My take on this is to slowly grow the number of demos and have each one highlight a certain part.

As more people start building stuff, more examples will become available, and hopefully more people will start making tutorials on the subject.

@BastiaanOlij
I would've been more okay with the current state of docs and examples if the thing itself was a commonly used concept elsewhere. I look up stuff for other engines all the time because often they have more resources than Godot does. The same concepts often apply anywhere. However, for compute shaders there's just an extreme lack of resources which caused me to comment on this example; it's too small to really show how to use compute shaders properly and therefore isn't too useful.

@robbertzzz

Thx for your feedback. I think there are a few points and I am not sure exactly.

Could you elaborate a bit more?

it's too small to really show how to use compute shaders properly
==> Totally agree!!!

I think Godot4 is now at an interesting point to get to the next level where aspects of previously of low interest with Godot3, e.g. 3D realism and more interesting/advanced shading => is NOW the main feedback from the recent GDC conference => is now the industry expectations.

@GeorgeS2019
I'm not talking about the features the engine has, just the documentation around it. Most concepts are easy to pick up; even if Godot is lacking in documentation and examples other engines will have plenty to work from. Some details will be different, but the core of a common feature is very similar across engines.

Compute shaders in particular are a technology that have very little understandable documentation for someone who isn't a graphics programmer. Not in the Godot docs/examples, and not anywhere else. So I'd like to see more of that here.

@robbertzzz totally hear you there, there are a lot of examples of how things work in the source code of Godot itself, but finding good use cases of how to use compute shaders effectively are still far and few between.

All I can say is, we're at the beginning of this journey, we're only just seeing people experiment with this. Good tutorials and examples will start to become available as usage of this grows and as we unlock more features around this in the engine.