KSML is a runtime-agnostic engineering layer for GLSL. Unlike engine-specific shader systems, it is non-invasive and provides modules, namespaces, and first-class IDE support.
- IntelliJ IDEA Plugin: https://github.com/tttsaurus/ksml-intellij-plugin
- Official KSML Compiler: https://github.com/CleanroomMC/KSML-Compiler
Changes to the Kirino Shader Meta Language (KSML) specification.
- Introduced
.ksmlsource files, modules, and explicit namespaces. - Defined
@module,@requires, and@importfor module declarations and dependency resolution. - Proposed
@gl_versionand@gl_requiresfor compile-time GLSL version diagnostics. - Introduced
@exportfor controlling function and struct visibility. - Proposed GLSL macro-based feature handling and source mapping through
#line. - Established source transpilation without runtime shader assembly or full GLSL AST analysis.
- Changed GLSL imports to the comment-based
// @importsyntax. - Introduced
@code """ ... """blocks, each containing one GLSL function definition. - Moved
@exportand@gl_requiresto annotations on individual code blocks. - Replaced the proposed macro-based feature handling with
@featureannotations controlled by compiler configuration. - Added GLSL profile requirements to
@gl_versionand@gl_requires. - Clarified transitive dependency resolution and namespace rewriting.
- Dropped the proposed export aliases and struct declarations from the defined syntax.
- Aligned profile resolution with the GLSL specification.
- Removed context-dependent profile inference.
- Required explicit namespace qualification for all KSML function calls, including calls within the same module.
- Defined version requirement compatibility using GLSL version and profile semantics.
- Distinguished module-level version mismatches (
NOTICE) from function-level mismatches (WARNING).
- Explicit support for multiple
@requiresdeclarations, with one dependency per line. - Validation against the supported desktop GLSL version set.
- Profile validation for versions below GLSL 150, where profiles do not exist.
- Support for
compatas a KSML-only abbreviation forcompatibility. - Explicit rules against duplicate
@importand@requiresdeclarations. - Identifier requirements for feature names.
- Defined diagnostic severity and compilation behavior.
- More formal rules.