racz16 / WebGL-GLSL-Editor

WebGL GLSL shader editor extension for Visual Studio Code.
Other
100 stars 12 forks source link

conflict with ts-shader-loader #16

Closed crafted-composites closed 2 years ago

crafted-composites commented 2 years ago

when using "ts-shader-loader" in line import statement "@import ./file;" all variables declared above the @ statement are greyed out and receive "variable is never used"

its a great extension and "ts-shader-loader" has best es6 implementation so would be nice for them to work together.

Screen Shot 2022-01-20 at 11 19 06 PM
crafted-composites commented 2 years ago

commenting out the @import statement fixs the problem

racz16 commented 2 years ago

First of all, sorry for my late answer, I haven't realized, that there are new issues. The problem is that @import is the ts-shader-loader's own syntax and it's not standard by any means. Furthermore the @ is actually an invalid character in GLSL. Because of this the GLSL compiler (which is a binary executable, so I can't even modify it) will never accept this syntax. The reason why my extension shows this message is that it can't understand the code after your import statement and after the import statement you won't be able to use any of my extension's features, for example the IntelliSense won't provide you correct items if any. Implementing all the necessary features would be a huge task, but I don't want to create new features to this extension. So, sorry, but the extension won't support this kind of syntax.