Shader validatorThis is a vscode extension allowing syntax highlighting, linting & symbol providing for HLSL / GLSL / WGSL shaders. It is using shader-language-server to lint shaders using common validator API & parse symbols for some code inspection. Currently, it support some features and languages:
FeaturesSyntax highlightingThis extension provide improved syntax highlighting for HLSL, GLSL & WGSL than the base one in VS code. DiagnosticsYou cant lint your code in real time through this extension:
AutocompletionThe extension will suggest you symbols from your file and intrinsics as you type. SignatureView available signatures for your function as you type it. HoverView informations relative to a symbol by hovering it. GotoGo to your declaration definition by clicking on it. Inlay hintsAdd inlay hints to your function calls. You can disable this in settings.json (default pressed is Ctrl+Alt)
RegionsGrey out inactive regions depending on currently declared preprocessor & filter symbols. VariantsSwap shader variant on the fly to change regions behaviour & macro definition. And much moreThis extension also support some features such as document symbols, workspace symbols... Extension SettingsThis extension contributes the following settings:
HLSL specific settings:
GLSL specific settings:
Platform supportThis extension is supported on every platform, but some limitations are to be expected on some:
Web supportThis extension run on the web on vscode.dev. It is relying on the WebAssembly Execution engine. Because of this restriction, we can't use dxc on the web as it does not compile to WASI and instead rely on glslang, which is more limited in linting (Only support some basic features of SM 6.0, while DXC support all newly added SM (current 6.8)). CreditsThis extension is based on a heavily modified version of PolyMeilex vscode-wgsl |