Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>python-string-shadersNew to Visual Studio Code? Get it now.
python-string-shaders

python-string-shaders

Almar Klein

|
545 installs
| (1) | Free
Shader syntax highlighting in Python multiline strings
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

python-embedded-shader

Adds syntax highlight support for shaders in python multiline strings in VS Code.

Features

Supported shader languages

  • wgsl
  • glsl
  • hlsl
  • metal

Snippets

Provides snippets to create an embedded shader string, so you don't have to remember the syntax.

Jinja templating

Jinja templates are syntax-highlighted. The tokens are rendered as keywords, and the content as string (shaders don't have/use string).

Unfortunately, this does not work for shaders embedded in Python strings. If you know how to fix that I'd love to learn.

Example

for i in range(10):
    print(i)

shader = """//wgsl
    fn produceResult(vec2<f32> foo, f32 bar) -> vec2<f32> {
        return foo * bar;
    }
"""

Notes

  • You need to install syntax highlighting support for the shader languages separately.
  • This only provides syntax highlighting, no autocompletion or linting of your shaders.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft