Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Apple Metal Shading LanguageNew to Visual Studio Code? Get it now.
Apple Metal Shading Language

Apple Metal Shading Language

Jakub Jirak

|
8 installs
| (0) | Free
Language support for Apple Metal Shading Language 4
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Metal Language Support for VS Code

Metal Logo

Comprehensive language support for Apple Metal Shading Language 4 in Visual Studio Code.

Features

  • 🎨 Syntax Highlighting - Complete syntax highlighting for Metal Shading Language 4
  • 📝 Code Snippets - Useful snippets for shaders, compute kernels, and common patterns
  • 🔧 Language Configuration - Auto-closing brackets, commenting, and indentation
  • 🎭 Custom Theme - Dark theme optimized for Metal code
  • 📁 File Icons - Custom icons for .metal and .msl files
  • ⚡ Performance - Lightweight and fast

Supported File Extensions

  • .metal - Metal shader files
  • .msl - Metal Shading Language files

Installation

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "Metal Language Support"
  4. Click Install

Usage

Simply open any .metal or .msl file and enjoy full language support including:

  • Syntax highlighting for Metal keywords, types, and built-in functions
  • Code snippets for common patterns
  • Auto-completion and bracket matching
  • Comment toggling with Cmd+/ (Mac) or Ctrl+/ (Windows/Linux)

Code Snippets

This extension includes snippets for:

  • Vertex shaders
  • Fragment shaders
  • Compute kernels
  • Common Metal types and functions
  • Buffer declarations
  • Texture sampling

Type the snippet prefix and press Tab to expand.

Metal Language Features

This extension supports Metal Shading Language 4 features including:

  • Built-in Types: float, float2, float3, float4, half, int, uint, bool, etc.
  • Texture Types: texture1d, texture2d, texture3d, texturecube, etc.
  • Sampling: sample, read, write operations
  • Compute Kernels: kernel functions with threading
  • Vertex/Fragment Shaders: vertex, fragment functions
  • Memory Spaces: device, constant, thread, threadgroup
  • Built-in Functions: Math, geometric, and texture functions

Configuration

You can configure the extension in VS Code settings:

{
  "metal.enableDiagnostics": true,
  "metal.formatOnSave": false
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

See CHANGELOG.md for a list of changes.

About Apple Metal

Apple Metal is a low-level, low-overhead hardware-accelerated 3D graphic and compute shader API. It provides near-direct access to the graphics processing units (GPUs) on iOS, macOS, and tvOS devices.


Enjoy coding in Metal! 🚀

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft