{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiahlxwoh5uwjweogtisetamx5b4qzuaupugi4vgmcho3qbheejf7m",
"uri": "at://did:plc:dxjzgxe7cvirxkwfjr2tjspt/app.bsky.feed.post/3mhbpal4me7k2"
},
"path": "/t/an-attempt-at-vulkan/49433#post_20",
"publishedAt": "2026-03-16T10:33:23.000Z",
"site": "https://hub.jmonkeyengine.org",
"textContent": "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.\n\nSo instead of trying to compile opengl shaders to vulkan we compile vulkan shaders to opengl?\n\nSomething like\n\n`BIND (location=....) in vec2 texCoord;`\n\nthat is transformed to\n\n`layout(location=...) in vec2 texCoord;`\n\nfor vulkan\nand\n\n\n in vec2 texCoord;\n\n\nfor opengl",
"title": "An attempt at Vulkan"
}