linter-glsl icon indicating copy to clipboard operation
linter-glsl copied to clipboard

How to ignore certain variable names

Open weepy opened this issue 7 years ago • 1 comments

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 avatar Feb 12 '18 15:02 weepy

@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

andystanton avatar Feb 12 '18 15:02 andystanton