Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Nifty Shaders: GLSL, HLSL & WGSL ChecksNew to Visual Studio Code? Get it now.
Nifty Shaders: GLSL, HLSL & WGSL Checks

Nifty Shaders: GLSL, HLSL & WGSL Checks

Nifty

|
1 install
| (0) | Free
GLSL, HLSL and WGSL: syntax colours, errors from glslangValidator and naga (bundled for WGSL, works on the web), #include links, hover docs, completion and outline.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Nifty Shaders: GLSL, HLSL & WGSL Checks

GLSL, HLSL and WGSL: syntax colours, errors from glslangValidator and naga (bundled for WGSL, works on the web), #include links, hover docs, completion and outline.

Maintained. No sign-in. No telemetry. Works in VS Code, Cursor, Windsurf, VSCodium and other editors that use Open VSX.

Features

A GLSL fragment shader with an error from glslangValidator underlined, and the hover docs for smoothstep

A WGSL shader checked by the built-in naga, with the outline of its structs, bindings and entry points

  • Errors while you type, from the real compilers:
    • GLSL (.glsl, .vert, .frag, .comp, .geom, .tesc, .tese, ray tracing and mesh stages) and HLSL (.hlsl, .hlsli, .fx) with glslangValidator, the Khronos reference compiler. Vulkan GLSL (descriptor sets, push constants, gl_VertexIndex) is compiled to SPIR-V for Vulkan; everything else is checked against OpenGL rules. Every HLSL entry point (VSMain, PSMain, [numthreads] kernels, SV_Target returns) is checked with its own stage.
    • WGSL with naga, the compiler inside wgpu and Firefox. naga is built into the extension, so WGSL is checked with nothing installed, and in vscode.dev and github.dev too. If you have the naga CLI (cargo install naga-cli), that's used instead.
  • glslangValidator in one click. If it isn't on your PATH, the extension offers to download the pinned glslang release from GitHub (about 8 to 14 MB) and checks its SHA-256 before using it. Nothing is downloaded unless you say so. Without glslang, GLSL with #version 440 and newer is still checked by the built-in naga.
  • Knows each file's stage from its name (light.vert.glsl, blur_cs.hlsl, ShadowVS.hlsl), from shaderc's #pragma shader_stage(fragment), or from a // nifty-shaders: stage=frag entry=PSMain comment that Set Shader Stage… writes for you.
  • #include that works: Ctrl+click to open an included file, nifty.shaders.includeDirs for your include folders, errors in an included file shown on that file, and missing files reported. GLSL files that use #include without GL_GOOGLE_include_directive are checked the way glslc builds them.
  • Hover docs and completion for the built-in functions, variables, types and attributes of GLSL, HLSL and WGSL (smoothstep, gl_FragCoord, SV_Target, textureSample, @builtin(position)…), plus your own functions, structs and uniforms, including those from included files.
  • Outline, breadcrumbs and go to definition for functions, structs, uniform blocks, cbuffers, bindings and #defines.
  • Format GLSL and HLSL with clang-format (your .clang-format applies) when it's installed.
  • Syntax colours for GLSL and WGSL; HLSL keeps the editor's built-in colours.

The status bar shows which checker the current file uses, or why it isn't checked.

Commands

Command What it does
Nifty Shaders: Check Shader Check the current file now
Nifty Shaders: Set Shader Stage… Write the stage (and HLSL entry point) into the file as a comment
Nifty Shaders: Download glslang (glslangValidator) Download the pinned glslang release, after asking (desktop only)
Nifty Shaders: Show Log The exact compiler commands and what they said

Settings

Setting Default What it does
nifty.shaders.checkOn type type, save or off
nifty.shaders.includeDirs [] Folders to search for #include files
nifty.shaders.defines [] Macros for glslangValidator, e.g. ["MAX_LIGHTS=8"]
nifty.shaders.glsl.target auto auto, opengl or vulkan
nifty.shaders.glsl.vulkanVersion 1.2 Vulkan version for Vulkan GLSL
nifty.shaders.glsl.defaultStage frag Stage for .glsl files whose name doesn't say
nifty.shaders.hlsl.defaultStage frag Stage for HLSL entry points that give no hint
nifty.shaders.hlsl.entryPoint main Entry point when a file has no VSMain / PSMain-style functions
nifty.shaders.glslang.path "" glslangValidator. Empty: PATH, then the downloaded copy
nifty.shaders.glslang.downloadBase "" A mirror of glslang's GitHub releases
nifty.shaders.naga.path "" naga CLI. Empty: PATH, then the built-in naga
nifty.shaders.wgsl.validator auto bundled always uses the built-in naga
nifty.shaders.clangFormat.path "" clang-format. Empty: PATH
nifty.shaders.timeoutMs 20000 Stop a checker that runs longer than this

Good to know

  • Other shader extensions: the language ids are the usual glsl, hlsl and wgsl, so settings and other tools keep working. If another extension also colours GLSL or WGSL, the editor uses one of the two grammars.
  • HLSL is checked with glslang's HLSL front end (the one used to make SPIR-V from HLSL). DirectX-only features that it doesn't support may be reported even when DXC accepts them.
  • In the browser, HLSL and GLSL older than 4.40 aren't checked (glslang can't run there); everything else works.

Third-party software

  • naga (the wgpu project's shader compiler), built into this extension as WebAssembly through the naga-wasm package (version 30.2.0, pinned), under the MIT license (MIT OR Apache-2.0 at your choice).
  • glslang is not included; Download glslang fetches the Khronos release (BSD-3-Clause and other permissive licenses) from GitHub when you ask for it.

Install

  • VS Code: search for "Nifty Shaders" in the Extensions view, or install from the Visual Studio Marketplace.
  • Cursor, Windsurf, VSCodium, Kiro, Antigravity: install from Open VSX.

Privacy

This extension collects no telemetry and needs no account. It only goes online when you ask it to download glslang.

More Nifty tools

  • Nifty HCL Tools: .tf and .hcl Language Support: Fast, lightweight Terraform and OpenTofu support: highlighting, outline, go to definition and references across a module, hovers, completion, undefined-reference errors and formatting. (Open VSX)
  • Nifty Java Quality: Format, Checkstyle & PMD: Format Java with google-java-format or palantir-java-format, and see Checkstyle and PMD problems as you save. Tools download from Maven Central when you say so; zero setup for Maven and Gradle. (Open VSX)
  • Nifty Nginx: nginx.conf Formatting & IntelliSense: nginx config support: syntax highlighting, formatting, directive completion and docs on hover, context checks, and snippets for reverse proxies, SSL and PHP. (Open VSX)
  • Nifty PHP Quality: PHPStan, PHPCS & Pint: PHPStan, PHP_CodeSniffer, Laravel Pint and PHP-CS-Fixer in one extension: problems as you save, one Fix command, and zero setup when the tools are in your project's vendor/bin. (Open VSX)
  • Nifty Shell Format: shfmt Formatter for Bash: Format shell scripts (bash, sh, zsh, bats) with shfmt built in: no binary to install, reads .editorconfig, and shows syntax errors. (Open VSX)
  • Nifty TOML: Format, Validate & Schemas: TOML support: highlighting, errors, a formatter that keeps comments, outline, folding, and JSON Schema validation, completion and hover (Cargo.toml, pyproject.toml via SchemaStore). TOML to JSON/YAML. (Open VSX)

See all 100+ Nifty extensions and web tools at https://getnifty.dev

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft