Hello,
I don’t know if this belongs here, as I don’t have much experience with shaders I think this is mostly a question of me doing something wrong along the way…
I’ve tried to test the conversion from GLSL to WGSL similarly to what I found on this thread: https://forum.babylonjs.com/t/can-i-use-the-tintwasm-library-in-the-babylon-js-repository/23673
I’ve setup locally a small empty .Net Web App with 4.8.1 framework and I used the approach from user @cx20 on his jsfiddle from the thread above.
The code and directory setup is as follow:
The vertex or fragment code that I want to convert is copied-pasted from the shaders that I found into the constants in js file.
The glslang and twgsl files are from the cdn snapshots 8.26.0 and 8.26.1 downloaded today, I’ve tested with both of them separately.
I’ve converted some fragment and vertex shaders succesfully, but the fragment shader from https://github.com/veldrid/veldrid/blob/master/src/NeoDemo/Assets/Shaders/ShadowMain.frag gives an error in console and the wgsl shader is created only as far as the line seen in the image below:
It’s something that eludes me, is a problem with that shader or I messed something up?
Thank you and have a nice day!



