External Publication
Visit Post

An attempt at Vulkan

jMonkeyEngine Hub March 16, 2026
Source

what about defining a custom jme macro to wrap all the vulkan stuff, then edit every shader to use it in its vulkan compliant uniforms/inout declarations, and gate the macro inside GLSLCompat so that it actually resolves to the vulkan binding if the shader is being compiled on vulkan or to nothing if compiled on opengl? Is that something possible? If not, the other best option is to use a custom glsl preprocessor that does the same.

So instead of trying to compile opengl shaders to vulkan we compile vulkan shaders to opengl?

Something like

BIND (location=....) in vec2 texCoord;

that is transformed to

layout(location=...) in vec2 texCoord;

for vulkan and

in vec2 texCoord;

for opengl

Discussion in the ATmosphere

Loading comments...