GLSL / WGSL composition example
patriciogonzalezvivo opened this issue · 4 comments
Hi! I'm interested on using naga-oil
to combine GLSL functions inside a WGSL shader. Is there any example or documentation for that? What would be the right place to start with it?
Thanks in advance
there's no example but the wgsl_call_glsl
test should get you started.
beware: there are pretty severe limitations about using bindings in glsl. if you want to call glsl functions that just use their input params you should be ok.
Thanks for the fast answer.
What are those limitations?
I have question on how defines macros / overloading and error reporting will work
the limitations are all related to bindings as far as i'm aware - glsl bindings get renamed by naga to ensure uniqueness over stages and so can't be referenced.
defines, overloading and error reporting should work transparently, although this whole area isn't very well exercised so you may find bugs.
Thank you, this have been super useful!