laurentlb / shader-minifier

Minify and obfuscate GLSL or HLSL code

Home Page:https://ctrl-alt-test.fr/minifier/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Renaming breaks with switch case

laurentlb opened this issue · comments

Input:

vec3 fRep()
{
  switch (array)
  {
    case BLAH: foo;
    case BLAH: foo;
    case BLAH: { foo; break; }
    case BLAH: foo;
    case BLAH: foo;
  }
}

with flag --no-inlining, output:

vec3 B()
{
  switch(array){
    case BLAH:
      foo;
      case B:foo;
    case BLAH:
      {
        foo;
        break;
      }
      case H:foo;
      case A:foo;
  }
}

The BLAH shouldn't be renamed.