Note how the COUNT constant was removed and replaced with its value almost everywhere, except in the first line. Thus, glslx outputs an invalid shader.
(Aside: it would be great if I could prevent just this constant from being inlined at all. I need to recompile my shader with different values of COUNT depending on the data points I have. So far, my workaround is shader = shader.replace(/COUNT/g, count).replace(/100/g, count);, but I can imagine a few scenarios where that will break.)
Hello,
a hypothetical shader example:
will compile pixelShader to
Note how the COUNT constant was removed and replaced with its value almost everywhere, except in the first line. Thus, glslx outputs an invalid shader.
(Aside: it would be great if I could prevent just this constant from being inlined at all. I need to recompile my shader with different values of COUNT depending on the data points I have. So far, my workaround is
shader = shader.replace(/COUNT/g, count).replace(/100/g, count);
, but I can imagine a few scenarios where that will break.)