Closed MV10 closed 4 months ago
I can confirm this behaviour with the NVDIA driver GLSL compiler and glslang.exe as external compiler. I only show these compiler warnings in the extensions. So no I cannot do anything about wrong compiler errors.
My guess is that the ambiguity between an one-line comment //
and a multi-line comment /*
causes this. Maybe the WebGL compiler for GLSL does not share this trait.
Ok I'll close this, I wasn't clear about what is actually doing the compiles in the IDE vs actual execution. Thanks!
Is this the right place to report compiler errors?
Anyway... VS2022 17.9.6 and extension version 0.11.174, it appears that a double-slash comment that isn't followed by a space is marked as an error, but that might be a fluke, which I'll explain. (Also this problem isn't a big deal to me, it's something I noticed in passing, this file compiles and runs fine "for real" outside the editor.)
Add a space after the slash and it goes away.
I say it might not be the actual problem because it also seems to introduce bizarre incorrect error messages later in the file, like this one (the
fre
variable is defined, and the earliertx2
error wouldn't have some downstream impact;fre
has no dependency ontx2
up to that point; alsofre
is used a couple times in lines preceding this one, which are not marked as errors):I was going to post one big screenshot showing both of those in view at the same time, and to make it reasonable-sized, I was going to delete a bunch of large comment blocks in the middle -- but as I start messing with those blocks, one or both of the errors disappear. So I'm not entirely sure my assumption is right that
//
without a space is actually the problem.If you want to play around with the file, you can get it here:
https://github.com/MV10/volts-laboratory/blob/master/shaders/disco_tunnel.frag
It hasn't changed in a long time, and is unlikely to change again any time soon. For me, lines 290 and 317 are marked as errors.