From fffdbf421565ab423f2482730dc95212507691db Mon Sep 17 00:00:00 2001 From: John Carmack Date: Tue, 23 Jun 2026 19:50:12 -0700 Subject: [PATCH] Add glslint editor integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Recommend the glslint extension (johncarmack1984.glslint) so contributors get luma.gl/deck.gl-aware GLSL diagnostics, and add glsl-lsp.toml binding each shader to the modules it uses at link time plus a drift cross-check between the GLSL UBO blocks and modules.ts uniformTypes. Dev-tooling only — not part of the published package. --- .vscode/extensions.json | 3 +++ glsl-lsp.toml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .vscode/extensions.json create mode 100644 glsl-lsp.toml diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..54fc79d --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["johncarmack1984.glslint"] +} diff --git a/glsl-lsp.toml b/glsl-lsp.toml new file mode 100644 index 0000000..2a12f46 --- /dev/null +++ b/glsl-lsp.toml @@ -0,0 +1,31 @@ +# Config for glslint, a luma.gl/deck.gl-aware GLSL checker + LSP. +# Mirrors the `new Model({ modules: [...] })` bindings in src/WindLayer.ts so each +# shader is validated against exactly the modules it uses at link time. Without +# this file glslint auto-derives those bindings from the Model() calls; it's kept +# for the `types` drift cross-check below (modules.ts uniformTypes vs the GLSL UBO). + +[[module]] +name = "windUniforms" +source = "src/shaders/windUniforms.glsl" +types = "src/modules.ts" # cross-check the UBO block against modules.ts uniformTypes + +[[module]] +name = "blitUniforms" +source = "src/shaders/blitUniforms.glsl" +types = "src/modules.ts" + +[[module]] +name = "project32" +builtin = true # deck.gl project32 builtins (resolved from node_modules) + +[[shader]] +match = "draw.*.glsl" +modules = ["project32", "windUniforms"] + +[[shader]] +match = "update.*.glsl" +modules = ["windUniforms"] + +[[shader]] +match = "blit.*.glsl" +modules = ["blitUniforms"]