Is there any possibility to make use of the tesselation or geometry shader stages in Godot 3?
I'm trying to write a plugin to procedurally generate trees with adaptive LOD. For good performance I think it would be best to solve this on the gpu preferably in the tesselation shaders or alternatively in the geometry stage however I didn't find any possibility to do so yet.

I also thought about using compute shaders but from what I could see they will only be available in Godot 4 using Vulcan.

Any help or ideas on that topic would be very welcome!

Thanks in advance,
Mocca

PS: If need be I might also look into Godot 4 and Vulkan, but as I don't have much experience with either and since Godot 4 is still in alpha, any option in Godot 3 would be preffered.

No tesselation, geometry or mesh shaders in godot 3/GLES 3. Vulkan would have it, but afaik godot shader language in 4.0 does not implement any of it yet(if ever). Whatever you want to do with them would likely have to be done as a gdextension.

    No, I don't think it's supported. You can create geometry with code, but it's done on the CPU.

    Megalomaniak hm okay thanks for the reply, could you elaborate on the gdextensions or do you have any advice on how to best get started with them?

    Megalomaniak Thanks! And last question: Do you know any resources (tutorials/references) for GDNative/GDExtionsions or even Modules for extending the graphical funtionality of Godot? Anything that could help me get a better grasp of how I could achieve what I want. You've already been a great help so thanks for that, as I'm relatively new to this I'm just looking for a good place to get started.

      Mocca The trouble here is that godot 4.0 is still in development and new things like this might not yet be very well documented. Your best bet might be to ask on godot contributors chat when it's not particularly busy(i.e. some meeting going on), the developers might very well welcome some feedback from people actually using and testing the new thing as well.

      Also, I'm not too sure but some of the developers might be active on matrix and also there's some few developers that might occasionally check in on the forum here such as @Calinou

      Okay thank you very much for the tip!
      I'll look a bit more into the documentation and then try my luck there. 🙌

      cybereality
      Thanks, yeah that's kind of what I'm doing at the moment, I just planned to move the generation on the gpu for scaling later on as I suspect it would get quite troublesome with a larger amount of trees otherwise.

      Talking about graphics api, one can do it in the geometry stage, or in a vertex shader, and give it the look of diversity and randomness, even a systematic influence and movement like wind would have, by offsetting a mesh via texture lookups.

      Basis would be just a few meshes, a deciduous tree, coniferous tree, one or two fruit trees, one can introduce variation through colour, size, rotation, bending. That's very fast, it wouldn't much affect the performance even if thousands of objects where rendered that way, as long as they aren't too complicated and one can do it in a single draw call through instancing, which GLES3 supports, I think.

      See the basic example of a grass field, but this can be taken much farther of course.

      Hope this isn't too much over engineering :-)

      GPU tessellation has disadvantages, it is relatively limited in its functionality, and it doesn't really generate geometry. The above is much more flexible.