Closed gszep closed 2 weeks ago
Hello gszep, I just pushed a change that adds the filename as the default value for the label. For now I haven't added any built in label support (not sure what the best way to do so would be), but it can still be achieved by doing something like the following:
import shaderCode from "./shaders/example.wgsl";
shaderCode.label = "MyLabel";
const cellShaderModule = device.createShaderModule(shaderCode);
In case you meant with "labels" support for SourceMaps, I was trying to implement it but couldn't quite get it to work. Either that or my Browser doesn't support sourceMaps. From the developer.mozilla.org website:
Note: Different implementations may handle sourceMaps in different ways, including possibly ignoring them entirely.
So for the time being no sourceMap support unless someone smarter than me figures out how to implement it. :cry:
Great loader! Super helpful thanks. Ideally there would be support for labels to help with debugging
Do you think this is possible? Or perhaps some other way of defining a label. It is not possible to do after
createShaderModule
is called