Open mitchmindtree opened 4 years ago
Yeah… not supported so far. :cry:
I need to find a better way to represent and parse CPP directives. Right now, they work because I represent them as part of the AST, but they should be implemented cross AST. I’m still looking for ideas and ways to do that efficiently.
#define
are supported at the global space, though. But I definitely want a better CPP representation to support all possible cases.
@mitchmindtree may I ask where those examples can be found? I’d love to integrate them to glsl
as part of the integration test suite!
Thanks for the update! And no worries, I have no qualms with moving the defines to the global space :+1:
You can find those shaders at the Vidvox repo here.
I’m working on the preprocessor issue. :)
Is there any news on this?
I just attempted to parse a large collection of test shaders, and they all worked beautifully, except one!
Here's the culprit in its entirey:
The panic provides the following error:
This refers to the
#define
in thetransition
function towards the bottom.I'm unsure - are nested
#define
s like this even officially supported as a part of GLSL? I haven't seem them before. That said, this shader is one of the standard shaders provided with VDMX (quite a popular VJ application), so I guess there's at least one GLSL parser out there that does support it.