lwjglgamedev / vulkanbook

Online book which introduces the main concepts required to write graphics games or any other applications using Vulkan in Java by using the LWJGL library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Geometry shaders?

rongcuid opened this issue · comments

After a system upgrade, the code I wrote no longer works. As this ticket from LunarG, geometry shaders have been removed:

https://vulkan.lunarg.com/issue/view/63b424725df11200d569af21

Does the deferred shader in this book really use geometry shader? I only remember using vertex and fragment shaders, and they are done in two passes.

Hi,

Gemotry shaders are used to render shadow depth maps. Since we need to render the same set of objects for each splot, instead of submitting the drawing commands for each splt, we achieve that with a single command with a geometry shader.

In any case, geometry shaders have not been deprecated, you can check that they are suported in Vulkan latest specs: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#shaders

What it seems from your ticekt is that they are not suported in MoltenVK. There is also an issue in the MoltenVK for this: KhronosGroup/MoltenVK#1524

You could change the code to either not using geometry shaders (but you should submit drawing commands for each split).