An attempt at Vulkan
jMonkeyEngine Hub
March 14, 2026
The shader is filled with a large number of macro commands.
This made my revisions extremely difficult.
My current idea is to perform the check at the front end rather than at the Vulkan backend.
That is to say: Before the Shader is handed over to the Renderer, you have already obtained the source and defines for each stage.
At this point, pure string patches (such as replacing macro guards, correcting attributes/varyings, inserting layouts, etc.) can be performed.
Static checks can also be conducted (such as balancing #if/#endif, checking for bare uniforms, and verifying if there are duplicate locations, etc.)
Of course, this is just a theory.
Discussion in the ATmosphere