Compression converts `else if` to `elseif`
micahjon opened this issue · 2 comments
micahjon commented
Hi, I noticed that compressing this shader code:
}else
if (mode == 1.0){ // GROW
offsetStrength *= 0.25;
Results in the following string:
}elseif(mode==1.0){offsetStrength*=0.25;
Where else if
is converted to elseif
I'm guessing this is unintentional. My understanding is that elseif
is not valid syntax for GLSL, or at least not widely supported. Thanks for looking into this.
pschroen commented
Hi, this would be an upstream issue as the logic is from rollup-plugin-glsl.
If you're determined to resolve the issue you can create an issue there, or remove the newline so else if
is on one line.
pschroen commented
Upstream issue vwochnik/rollup-plugin-glsl#6 for reference.