linter-glsl
linter-glsl copied to clipboard
How to ignore certain variable names
Hiya - is it possible to configure this to ignore certain rules ?
In particular I would like to be able to define some globals to ignore (e.g. u_resolution).
Thanks
J
@weepy this linter won't support that - it just calls glslangValidator and there's no way to tell that tool to ignore variables.
You might be interested in the glsl-preview package instead which supports the omission of Book of Shader style variables like u_resolution
, u_mouse
and u_time
, as well as providing a linting capability based on glslify
and a very nice preview of your shader.
There is a caveat with glslify linting - the line numbers of errors and warnings in glslify may not line up with the actual shader source. See glslify/glslify#95