AtomLinter / linter-glsl

Atom package that lints GLSL shaders on the fly.
https://atom.io/packages/linter-glsl
MIT License
15 stars 6 forks source link

How to ignore certain variable names #72

Open weepy opened 6 years ago

weepy commented 6 years ago

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

andystanton commented 6 years ago

@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