vscode-wgsl
vscode-wgsl copied to clipboard
Recognize and highlight wgsl shader strings in .js files
Hello, thank you very much for providing this plugin.
I have found a need that I am not sure if it can be implemented. Many shaders are not provided in the form of .wgsl files, but are written in .ts or .js files as strings. This is mainly to allow dynamic concatenation of shader code by passing parameters in the form of JavaScript functions. For example, in this project: https://github.com/Orillusion/orillusion.
So, is it possible to recognize wgsl shader strings in .js files and also perform code highlighting?
Perhaps add comments like /* wgsl */ for shader string, or such files could be identified with suffixes like .wgsl.ts or .wgsl.js.