mentos1386 / ts-shader-loader

A webpack loader for glsl shaders - includes support for nested imports.
19 stars 6 forks source link

conflict with WebGL-GLSL-Editor #3

Closed crafted-composites closed 2 years ago

crafted-composites commented 2 years ago

https://github.com/racz16/WebGL-GLSL-Editor/issues/16

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

your es6 implementation is the best of the shader loaders and would be great to see it work with the GLSL extension

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

commenting out the @import statement fixs the problem while still functioning,

mentos1386 commented 2 years ago

@crafted-composites it's probably due to @import being a custom syntax not official glsl syntax. Which makes the glsl editor extension behave weird.

mentos1386 commented 2 years ago

Closing as solution is to do comment out the import/include statement.