---
# System prepended metadata

title: GLSL Lint 設定(VS Code)
tags: [GLSL]

---

# GLSL Lint 設定(VS Code)
---
設定步驟
:::success
1. 安裝 glsl lint extension
2. [下載 glslang valdiator](https://github.com/KhronosGroup/glslang/releases/tag/master-tot)
3. 解壓縮放到任意位置, 這邊放在 C:
4. vscode extension setting 填寫 glslang validator path

    :::info
    C:\\\glslang-master-windows-x64-Release\\\bin\\\glslangValidator.exe

5. 必須開啟有支援的副檔名, 否則會跳出錯誤
    :::warning
    GLSL Lint: Wrong parameters when starting glslangValidator.
    Arguments: -l --stdin -S stderr:
    <br>
    | extension | type |
    | -- | -- |
    | .frag | fragment |
    | .vert | vertex |
    
6. VSCode 新增支援的副檔名
    :::success
    * 修改 settings.json
    * 新增欄位
    * [參考來源](https://github.com/hsimpson/vscode-glsllint/blob/master/README.md#additionalstageassociations-example)
        ```json
        "glsllint.additionalStageAssociations": {
            ".frag.glsl": "frag",
            ".vert.glsl": "vert"
        }
        ```
    
:::

---

###### tags: `GLSL`