- Compile or download a build of DirectX Shader Compiler: https://github.com/Microsoft/DirectXShaderCompiler
- Add
dxc
executable toPATH
or sethlsl.linter.executablePath
. - Add your shader include directories to
hlsl.linter.includeDirs
(Optional)
Use INPUTS
or INPUTS(type)
comments to tell the linter what variables are defined outside the scope:
// INPUTS(float2): uv
// INPUTS(Texture2D): Tex1
// INPUTS(SamplerState): LinearClamp
float4 color = Tex1.Sample(LinearClamp, uv);
Use @nolint
inside a //
comment to disable linting for a single line:
float a = some_function(); // @nolint