An attempt at Vulkan
jMonkeyEngine Hub
March 15, 2026
I’m a bit stuck and need a solution to make OpenGL’s GLSL compatible with Vulkan’s GLSL. I’ve looked up some literature, but none of it seems suitable for the current situation. Vulkan uses descriptors for binding, while OpenGL is different. Currently, jMonkeyEngine’s shaders are filled with macro commands that prevent Vulkan from compiling properly. Although both APIs can use GLSL, they still have differences in input handling. From the current perspective, the best approach seems to be using regular expressions to replace parts of the GLSL code. However, this would require writing multi-layer nested content, which could make future maintenance difficult. I’ve also looked at other game engines like UE and Unity, which seem to use a unique shading language that can compile into the binary files required by the target API, but this doesn’t seem ideal for jMonkeyEngine’s transition. So now I’m contemplating a way to both avoid modifying the current jMonkeyEngine shader content and achieve Vulkan compatibility. If anyone has relevant knowledge in this area, please share it with me. Thank you very much.
Discussion in the ATmosphere